![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I wanted to 301 redirect my non www domain to www.domain, I read that I have to insert the following lines to my .htaccess file. RewriteEngine On RewriteCond %{HTTP_HOST} ^mysite.com RewriteRule (.*) http://www.mysite.com/$1 [R=301,L] But I do not have acces to .htaccess file |
|
and I asked my host support to do that, They response is below: We have redirected configure-all.com/ to www.configure-all.com/ . We have added the following lines in .htaccess file. +++++++++++++ RewriteEngine on RewriteCond %{HTTP_HOST} !^www RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [L,R=301] +++++++++++++ Could some one please confirm that it is correct? When I type http://configure-all.com in URL it changes to www.configure-all.com but still I have doubt. |
#3
| |||
| |||
|
|
Hi, I wanted to 301 redirect my non www domain to www.domain, I read that I have to insert the following lines to my .htaccess file. RewriteEngine On RewriteCond %{HTTP_HOST} ^mysite.com RewriteRule (.*) http://www.mysite.com/$1 [R=301,L] But I do not have acces to .htaccess file and I asked my host support to do that, They response is below: We have redirected configure-all.com/ to www.configure-all.com/ . We have added the following lines in .htaccess file. +++++++++++++ RewriteEngine on RewriteCond %{HTTP_HOST} !^www RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [L,R=301] +++++++++++++ |
|
Could some one please confirm that it is correct? When I type http://configure-all.com in URL it changes to www.configure-all.com but still I have doubt. Thank you |
#4
| |||
| |||
|
|
RewriteEngine on RewriteCond %{HTTP_HOST} !^www RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [L,R=301] |
|
RewriteEngine on RewriteCond %{HTTP_HOST} ^configure-all.com$ RewriteRule http://www.configure-all.com/$1 [L,R=301] |
#5
| |||
| |||
|
|
Hi, I wanted to 301 redirect my non www domain to www.domain, I read that I have to insert the following lines to my .htaccess file. RewriteEngine On RewriteCond %{HTTP_HOST} ^mysite.com RewriteRule (.*) http://www.mysite.com/$1 [R=301,L] |
|
But I do not have acces to .htaccess file and I asked my host support to do that, They response is below: We have redirected configure-all.com/ to www.configure-all.com/ . We have added the following lines in .htaccess file. |
|
+++++++++++++ RewriteEngine on RewriteCond %{HTTP_HOST} !^www RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [L,R=301] +++++++++++++ Could some one please confirm that it is correct? When I type http://configure-all.com in URL it changes to www.configure-all.com but still I have doubt. |
#6
| |||
| |||
|
|
RewriteEngine on RewriteCond %{HTTP_HOST} ^configure-all.com$ RewriteRule http://www.configure-all.com/$1 [L,R=301] Maybe your version works also but at the end of the second line there must be a $ sign i think. But i can be wrong |
#7
| |||
| |||
|
|
Hi, I wanted to 301 redirect my non www domain to www.domain, I read that I have to insert the following lines to my .htaccess file. RewriteEngine On RewriteCond %{HTTP_HOST} ^mysite.com RewriteRule (.*) http://www.mysite.com/$1 [R=301,L] But I do not have acces to .htaccess file and I asked my host support to do that, They response is below: We have redirected configure-all.com/ to www.configure-all.com/ . We have added the following lines in .htaccess file. +++++++++++++ RewriteEngine on RewriteCond %{HTTP_HOST} !^www RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [L,R=301] +++++++++++++ Could some one please confirm that it is correct? When I type http://configure-all.com in URL it changes to www.configure-all.com but still I have doubt. Thank you |
#8
| |||
| |||
|
|
On Sat, 03 Jun 2006 22:52:45 +0200, FelixDEhuiskater pascal.beyens (AT) gmail (DOT) com> wrote: RewriteEngine on RewriteCond %{HTTP_HOST} !^www RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [L,R=301] Condition: if HTTP_HOST doesn't start with www RewriteEngine on RewriteCond %{HTTP_HOST} ^configure-all.com$ RewriteRule http://www.configure-all.com/$1 [L,R=301] Condition: if HTTP_HOST equals configure-all.com Looks like these are (almost) equivalent. First version will work also for subdomain.example.com (will redirect to www.subdomain.example.com) - second version will fail (will not redirect). But I can be wrong as well. Best, Borek |
#9
| |||
| |||
|
#10
| |||
| |||
|
|
"FelixDEhuiskater" <pascal.beyens (AT) gmail (DOT) com> wrote: RewriteEngine on RewriteCond %{HTTP_HOST} ^configure-all.com$ RewriteRule http://www.configure-all.com/$1 [L,R=301] Maybe your version works also but at the end of the second line there must be a $ sign i think. But i can be wrong Best is to make the Cond: if not equals. Have been posted many times on this subject before, see: http://johnbokma.com/mexit/2004/04/1...forgoogle.html for example with explanation. |
|
-- John Freelance Perl programmer: http://castleamber.com/ Firefox Fast Search:http://johnbokma.com/firefox/keymarks-explained.html |
![]() |
| Thread Tools | |
| Display Modes | |
| |