I've put on htaccess on xamp (I've used it before)
but trying to change the following
index.php?admin&user&list
to
example.com/admin/user/list
I have a few other pages behind /admin/
. Do I need to make 1 for every page?
I've put on htaccess on xamp (I've used it before)
but trying to change the following
index.php?admin&user&list
to
example.com/admin/user/list
I have a few other pages behind /admin/
. Do I need to make 1 for every page?
You can try:
RewriteEngine On
RewriteCond %{THE_REQUEST} \ /+index\.php\?
RewriteCond %{QUERY_STRING} ^(.*)&(.*)$
RewriteRule ^index\.php$ /index.php?%1/%2 [L,NE]
RewriteCond %{THE_REQUEST} \ /+index\.php\?
RewriteCond %{QUERY_STRING} !&
RewriteRule ^index\.php$ /%{QUERY_STRING}? [L]
This makes it so when you request http://example.com/index?abc&def&ghi
, the rules will internally route the request to /abc/def/ghi