php - Hiding URL parameter with Mod-Rewrite -
i not sure if possible. have following url structure
http://www.my-domain.com/layouts/page.php?artist=artist-name&link=1234
which shows in address bar as
http://www.my-domain.com/artists/artist-name/1234
in .htaccesss file have
rewriteengine on rewriterule ^artists/([^/]*)/([^/]*)$ /layouts/page.php?artist=$1&link=$2 [l]
what hide last variable (the 1234) showing in address bar still available process on target page. address bar show
http://www.my-domain.com/artists/artist-name
if not possible can save variable (the 1234) cookie .htaccess file remove variable isn't shown in address bar? can pick on target page cookie.
try using (.+)
. in manner:
rewriterule ^artists/artist-name/\d+-(.+) /artists/$1 [r=301]
Comments
Post a Comment