How can I redirect www.mydomain.com/person.php?ref=my-name to www.mydomain.com/my-name
My attempt...
RewriteEngine on
RewriteBase /
RewriteRule ^([^/]+)/?$ /athlete.php?ref=$1 [L]
...Internal Server Error
Thank you.
| SitePoint Sponsor |
How can I redirect www.mydomain.com/person.php?ref=my-name to www.mydomain.com/my-name
My attempt...
RewriteEngine on
RewriteBase /
RewriteRule ^([^/]+)/?$ /athlete.php?ref=$1 [L]
...Internal Server Error
Thank you.
spitfireweb

sfw,
If you want to access the value of any key in a query string, you must use a RewriteCond to access the {QUERY_STRING} variable. See tutorial linked below for examples.
Regards,
DK
David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
Client and (unpaid) WHB Ambassador
Updated mod_rewrite Tutorial Article (setup, config, test & write
mod_rewrite regex w/sample code) and Code Generator
Bookmarks