Hello Everyone I have a problem i am trying to redirect 301 resort-details.php?id=6 to /travel-weather6.htm So that the dynamic url will always direct to the new static pages Many Thanks Dave
Why don't you just insert the redirect into the php file like this: header('HTTP/1.1 301 Redirect permanent'); header('Location: http://www.yoursite.com/travel-weather'.$_GET['id']); exit; Code (markup): It should also be possible via mod_rewrite but might be a little more complicated. Edit: Forgot the HTTP status code
To do the redirect using mod_rewrite add something like the following to your .htaccess: RewriteEngine On RewriteCond %{REQUEST_URI} resort-details\.php RewriteCond %{QUERY_STRING} id=([0-9]+) RewriteRule ^.*$ http://www.site.com/travel-weather%1.html? [R=301,L] Code (markup):
Hi Chengfu The urls are dynamic so cannot use the header code but thanks anyway, itl looks like it might be some form of Mod-rewrite <edit> Chengfu you are a star works a treat....kiss kiss Many Thanks