Home RewriteRule not work with " / "
Reply: 0

RewriteRule not work with " / "

user545
1#
user545 Published in June 21, 2018, 12:57 am

I test UrlRewrite in local with wamp and i search to do this :
index.php?test=test123 to index/test123 with query string
My .htaccess :

Options +FollowSymlinks
RewriteEngine on

# Rule
RewriteRule ^index/([a-z0-9]+)$ index.php?test=$1 [QSA,L]

it's work but $_GET["test"] is empty.. If i test this :

RewriteRule ^index-([a-z0-9]+)$ index.php?test=$1 [QSA,L]

It's work. $_GET["test"] = "test123".
When separate " - " work and " / " not work ?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.51757 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO