Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

Redirecting non-www to www without losing link
(1 viewing) (1) Guest
Support forum for users using free edition of JoomSEF 3 (Joomla 1.5 compatible). These forums are mainly for mutual help between users.

Please note that due to our capacity limitations, we do not monitor these forums regularly.
  • Page:
  • 1

TOPIC: Redirecting non-www to www without losing link

Redirecting non-www to www without losing link 14 years, 6 months ago #12291

Hello,

I am currently trying to setup a site that is using JoomSEF.

I am needing to redirect all links to www without losing the link they are going to.

I am using this code
########## Begin 3rd Party or Core SEF Section
#
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php
#
########## End 3rd Party or Core SEF Section


I tried replacing the following
RewriteRule (.*) index.php


With
RewriteRule ^(.*)$ http://www.oakswings.com/$1 [L,R=301]


That just breaks the site.

Then I just tried to add this at the bottom of my htaccess
RewriteCond %{HTTP_HOST} ^oakswings.com [NC]
RewriteRule ^(.*)$ http://www.oakswings.com/$1 [L,R=301]


But that just redirects every link to /index.php

Any ideas?
  • Page:
  • 1
User Login Empty