I have a question about the htaccess rewriting rule.
Is it possible to change this URL:
www.site.com/en/test Something like this In: www.site.com/test .php? I tried to use this revised rule But the result of some online testing tools was the URL: www.site.com/en.php?language= Test < / Em> In advance thanks Matt The reason for this confusion is that When you use contexts, the first reference to the match is always $ 1, the second is $ 2 and so on It is only done by you, but only on parentheses: so you need to reverse it in your output, like:
RewriteRule ^ ([az] [az]) / (. *) $ $ 1 .php? Language = $ 2
= second match, the location of "test" in $ 2
RewriteRule ^ ([az] [ag]) / (. *) $ $ 2.php? Language = $ 1
Comments
Post a Comment