Reputation: 10649
I would like to make my url of:
example.com/index.php?this=a&that=b
to:
example.com/index.php/a/b
So that whenever somebody visits this page directly:
example.com/index.php/a/b
It will display in the address bar as typed, but will render the content for:
example.com/index.php?this=a&that=b
How is that done?
Upvotes: 0
Views: 28
Reputation: 18671
You can use that in your .htaccess
:
RewriteEngine on
RewriteRule ^index\.php/([^/]+?)/(.+)/?$ index.php?this=$1&that=$2 [L,NC]
Upvotes: 1