What is wrong with my .Htaccess file? I'm trying to redirect permanently my whole site to the index.

Posted by SocialAddict on Stack Overflow See other posts from Stack Overflow or by SocialAddict
Published on 2010-04-09T10:36:23Z Indexed on 2010/04/09 10:43 UTC
Read the original article Hit count: 369

Filed under:
|

This is giving me a 500 internal server error. Any suggestions? I have tried various examples but I think I'm missing something...

RewriteEngine On
RewriteCond  %{request_uri}!^/index\.htm
RewriteRule ^(.*)$ http://www.thedomain.co.uk [R=permanent,L]

It displays the homepage if I navigate there but anything that meets the conditions (all appart from index.htm gives the server 500)

© Stack Overflow or respective owner

What is wrong with my .Htaccess file? I'm trying to redirect permanently my whole site to the index.

Posted by SocialAddict on Server Fault See other posts from Server Fault or by SocialAddict
Published on 2010-04-09T10:36:23Z Indexed on 2010/04/09 14:03 UTC
Read the original article Hit count: 369

Filed under:
|

This is giving me a 500 internal server error. Any suggestions? I have tried various examples but I think I'm missing something...

RewriteEngine On
RewriteCond  %{request_uri}!^ /index\.htm
RewriteRule  ^(.*) /index\.htm [R=permanent,L]

It displays the homepage if I navigate there but anything that meets the conditions (all appart from index.htm gives the server 500)

EDIT: with the above code it now doesnt give any 500 errors but it doesnt redirect for any pages

© Server Fault or respective owner

Related posts about .htaccess

Related posts about redirect