cancel
Showing results for 
Search instead for 
Did you mean: 

mod_rewrite enabled

classroompixie
Member

Is mod_rewrite enabled on the BT servers by default ?

Or do I need to ask for it to be enabled?

 

I am using htaccess file to try to get a 301 redirect to work using the code below:

 

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^classroompixie\.com$ [NC]
RewriteRule ^(.*)$ http://www.classroompixie.com/$1 [R=301,L]

 


Trying to redirect http://classroompixie.com to http://www.classroompixie.com

 

Having no joy and am kinda puzzled.

 

I have the BT advanced web hosting & business essentials package.

 

Anyone able to offer any suggestions.

1 ACCEPTED SOLUTION

Accepted Solutions

dave
Guru

it should work by default. I used almost identical code in my .htaccess file and it worked fine. The file was in the public folder.

 

Mine is:

 

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]

 

The only real difference is I don't have the \ in the HTTP_HOST line.

View solution in original post

2 REPLIES 2

dave
Guru

it should work by default. I used almost identical code in my .htaccess file and it worked fine. The file was in the public folder.

 

Mine is:

 

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]

 

The only real difference is I don't have the \ in the HTTP_HOST line.

classroompixie
Member

No idea why but it now works.

 

Both the syntax I was using and yours seem to work fine.

 

Can only conclude that I must of been doing something different before.

 

Thanks for the super quick response btw.

 

 

Just wondering how I get my .co.uk url to point at my .com url now , purely for SEO reasons.

As when I ftp to them they both point at the same server space?