Skip to content
WJunction - Webmaster Forum

301 redirect error on DLE

Status
Not open for further replies.
hi

i am trying to redirect the www version of mt site to non www.
i have datalife engine installed .

Edited: ok nothing was wrong with my regex, i just had to add it above !!
 
Last edited:

1 comment

RewriteCond %{HTTP_HOST} !^www\.[a-z-]+\.[a-z]{2,6} [NC]
RewriteCond %{HTTP_HOST} ([a-z-]+\.[a-z]{2,6})$ [NC]
RewriteRule ^/(.*)$ http://%1/$1 [R=301,L]

?
im not 100% on what you want to do

or remove www

RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

and always start your htacess with

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
 
Status
Not open for further replies.

About the author

C
Active Member · Joined
566
Messages
9
Reactions
18
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom