View Single Post
  #1 (permalink)  
Old 03-13-2007, 03:34 PM
thindenim's Avatar
thindenim thindenim is offline
WebProWorld Pro
 

Join Date: Jan 2007
Location: Scotland
Posts: 241
thindenim RepRank 1
Default 301 Redirect and htaccess problem

I'm currently in the final stages of a redevelopment of our girlznight web site. The structure of the site has changed slightly and consequently, quite a number of the URLs have changed.

I have added the following redirect rule for one of our products to the main htaccess file. NB, boys-talk.co.uk is just the domain I am using to test before going live: -

redirect 301 /shop/beauty/skintruth-face/skintruth-nourishing-cleanser.html http://www.boys-talk.co.uk/shop/skin...-cleanser.html

There is a rewrite rule used for the product urls, which is: -

RewriteRule ^shop/(.*)/(.*).html index.php?init=viewproduct&did=$1&pid=$2&menu=shop

So, in theory http://www.boys-talk.co.uk/shop/beau...-cleanser.html

should redirect to

http://www.boys-talk.co.uk/shop/beau...-cleanser.html

However, if you try to go to the first url, it directs you to http://www.boys-talk.co.uk/shop/skin...nser&menu=shop

which is the new url, with a query string (which seems to be derived from the old redirected url) whacked on the end.

Sorry to be a little long winded with the description, but it's hard to explain any other way.

Can anyone shed any light on this... it's driving me crazy!

Thanks in advance.
__________________
Girlz Night - professional hair and beauty products
Web design glasgow - from Thin Denim
Reply With Quote