Forum Moderators: phranque
The new site has a very similar structure but it is of course /company.php?id=1234
Can someone tell me what I need to put in my .htaccess to redirect according the the query string?
Redirect 301 /directory.asp?id=*.* /content/company.php?id=*.%
Is soemthing like that possible?
You'll probably have to do the matching in den RewriteCond line, testing against %{request_uri} or something like that. You then can reference the matched string from the RewriteCond line with %N instead of $N in the RewriteRule line.
If you want to add new Url parameters but keep the exiosting ones as welln then use the [QSA] (query string append) flag.
I never tried it, but maybe this puts you in the right direction.
Also, see this recent thread [webmasterworld.com].
Jim
RewriteRule ^directory_display.asp$ http://www.example.co.nz/content/company [R=301,L]
e.g.
http://www.example.co.nz/directory_display.asp?i=3478
http://www.example.co.nz/directory_display.asp?i=3471
[edited by: jdMorgan at 1:09 am (utc) on May 2, 2008]
[edit reason] example.com [/edit]