mod rewrite - how to write a rule query_string RewriteEngine -
need of such http://example.net/tags/index.php?tag=anytag, create such http://example.net/tags/anytag doing
rewriteengine on rewritecond %{query_string} ^tag=(.*)$ [nc] rewriterule ^tags/index.php$ /tags/$1 [nc,l,r=301]
not working
maybe want other way round
rewriterule ^/tags/(.*)$ /tags/index.php?tag=$1
rewritecond
test string query_string
used, when input contains query string. if want rewrite url url, append desired query string target url.
mod-rewrite query-string
No comments:
Post a Comment