Jump to content

htaccess rule not working


ben03
 Share

Recommended Posts

Hi there,

I am using a few of re-write rules, the last of which is not working. I assume it clashes with the others in some way?

<IfModule mod_rewrite.c>

RewriteEngine on
RewriteCond %{HTTP_HOST} ^oldurl.co.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www.oldurl.co.uk$
RewriteRule (.*)$ http://www.newurl.co.uk/$1 [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]

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

</IfModule>

Any pointers here would be greatly appreciated!

Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...