I have a site working perfectly well for a few years , the guy who created it set it all up with nice clean url's via mod rewrite. I am cloning the site and re tasking it for another purpose and to this end I have moved the entire thing lock stock and barrel to a new server. The first major problem I have encountered is of course with the mod rewrite.
I have the original settings from the working website and have simply altered them to include the new url im using.
The original working code :
- Code: Select all
UseCanonicalName OFF
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.xxxxx\.com$
RewriteRule ^(.*)$ http://www.xxxxx.com$1 [R=301,QSA,L]
RewriteRule ^/(assets|admincp)/(.*) - [L]
RewriteRule ^/(.*)([^/])$ /$1$2/ [R=301]
RewriteRule ^/(.*)$ /index.php [QSA]
I stress again this is working fine on my exisiting website. It's running on the same Centos with the same modules active (if that makes any difference)..
The site I am trying to get it working on is http://xtgnv2.uzisuicide.co.uk and these are the changes i have made to get it working, sadly this ends in a redirect loop.
- Code: Select all
RewriteEngine on
RewriteCond %{HTTP_HOST} !^http://xtgnv2\.uzisuicide\.co\.uk$
RewriteRule ^(.*)$ http://xtgnv2.uzisuicide.co.uk$1 [R=301,QSA,L]
RewriteRule ^/(assets|admincp)/(.*) - [L]
RewriteRule ^/(.*)([^/])$ /$1$2/ [R=301]
RewriteRule ^/(.*)$ /index.php [QSA]
(UseCanonicalName OFF) is already set globally. Please note that on the rewriteCond line i have added the http:// as without it , it appears to do nothing at all.
Assuming that since it all works fine on another box with a different URL and that the code is ok, are there any other settings on the box i should be looking at to get this to work.
Spent 20 of the last 24 hours working on this and im just going around in circles now with no new ideas to try. Any advice/ideas/assistance anyone is able to lend would be massively appreciated.
Fingers crossed I have made a simple schoolboy error somebody is going to spot and point out! If of course there is any further information I need to post to help solve this problem - please do say so and I'll get right on it!