non www not redirecting to www

Using a single web hosting account to host multiple sites

non www not redirecting to www

Postby pushpinderbagga » Sat Jul 25, 2009 10:45 pm

hello richardk

my domain has an issue... I was worrying why traffic was less and there was no proper indexing ...

the redirection from non www to www was not working

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


by using the below code in my .htaccess... it still doesnt work...

Code: Select all
http://okidda.com/ doesnt redirect to http://www.okidda.com/


immediate help required... please help
pushpinderbagga
 
Posts: 36
Joined: Fri May 22, 2009 9:43 pm

Postby richardk » Sun Jul 26, 2009 5:14 am

Move
Code: Select all
# Stop processing if it's a request to a directory.
RewriteCond %{SCRIPT_FILENAME}/ -d
RewriteRule .* - [L]

so that it is after
Code: Select all
RewriteCond %{HTTP_HOST} ^(okidda\.com)$ [NC]
RewriteRule .* http://www.%1%{REQUEST_URI} [R=301,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

done

Postby pushpinderbagga » Sun Jul 26, 2009 7:44 am

thanks rickardk...

its works... I will ask if there is some problem...

thanks again...
pushpinderbagga
 
Posts: 36
Joined: Fri May 22, 2009 9:43 pm


Return to Domain Handling

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron