0

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?

1
  • When will people start to read documentations? Commented Aug 8, 2015 at 20:06

1 Answer 1

1

You can use that in your .htaccess:

RewriteEngine on 
RewriteRule ^index\.php/([^/]+?)/(.+)/?$ index.php?this=$1&that=$2 [L,NC]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.