Thread: How to redirect
View Single Post

  #3 (permalink)  
Old 06-07-2004
Andy Rigby
 
Posts: n/a
Default Re: How to redirect

It's the HTACCESS file I really need to find out about. I'm familiar
with editing it, as I've used it before, but I find it really hard to
get my head around the expression parsing syntax when it comes to only
redirecting certain page requests.

Andy

ecol1111@yahoo.co.uk (Andy Rigby) wrote in message news:<d7d8dd25.0406040623.7a2e1bf7@posting.google. com>...
> I'm transferring my site from static pages which are all called
> www.mysite.com/[productcode].html, to a PHP solution that will have one standard
> product page (product.php) and will take the product code to display
> as a parameter eg www.mysite.com\product.php?id=12345
>
> I'd like to make sure that all search engine links and other links
> that currently go straight to an HTML product page will still be able
> to find the correct page, so I thought I'd see if it can be done with
> a .htaccess redirect.
>
> eg
>
> redirect *.html *.php?id=????? (syntax obviously not perfect!)
>
> I'm hopeless at the expression parsing bit of htaccess and wondered if
> anyone has done a similar thing before. I will need to be able to
> exclude certain files (eg index.html) from the redirects, although I
> could even get round this if it's not possible.