.htaccess - Rewrite single GET variable in folder -
i have page example.com/art/?artist=name
want example.com/art/name
. i've tried multiple rewrite conditions , rules, none working. examples...
rewriteengine on rewriterule ^([^/]+)/? /art/index.php?artist=$1 [l,qsa] rewritecond %{query_string} (.*?)artist=(\w+)(.*) rewriterule ^ /%2?%1%3 [l,r=301]
another...
rewriteengine on rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^users/([^/]+)$ /users/$1/ [r=301,l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^users/([^/]+)/$ users/index.php?id=$1 [qsa]
i'd love have understanding of how works - right now, have no idea how .htaccess file does.
you close
rewriteengine on rewritecond %{query_string} artist=([^&]+) rewriterule ^art/$ /art/%1 [r=301,l,qsa]
Comments
Post a Comment