stop redirect from one site to another

Joined
12 Feb 2006
Posts
17,636
Location
Surrey
i've got 2 sites sharing one hosting account, let's call them site xxx and site yyy.

xxx is the main site for the hosting so using the htdocs folder, and site yyy uses htdocs/yyy/index.php etc but no one would know that any way.

i've got site xxx using a htaccess file redirecting when visitors go to /contact.php to /contact/

the issue i have is if the visitor is on site yyy and click the correct link to contact page which is contact.php it redirects them to xxx.com/contact/ which i'd like to stop as this shouldn't happen.

anyone know what i can do to stop this? this is what i have

Code:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^xxx\.co.uk$ [NC]
RewriteRule ^(.*)$ http://www.xxx.co.uk/$1 [R=301,L]

redirect 301 /contact.php http://www.xxx.co.uk/contact/
 
Last edited:
I've tried producing what your problem is without success.

Delete the rewrite lines and just try it with the;

Code:
redirect 301 /contact.php http://www.xxx.co.uk/contact/

Make sure the .htaccess file is in the root foler (public_tml/htdocs) and no .htaccess file is in the /yyy/ folder.
 
Back
Top Bottom