[Solved] Hide “index.php” from URL and get parameters [duplicate]


Yes, yet another .htaccess answer 😉

Options +FollowSymLinks -MultiViews

RewriteEngine On
RewriteBase /

# Internally forward /x/10 to /index.php?x=10
RewriteRule ^x/(.*)/?$ index.php?x=$1 [L,QSA,NC]

This will redirect:

http://yourdomain.com/x/10

Internally to:

http://yourdomain.com/index.php?x=10

So on the user does not see that on the browser.


As for the link to learn about it, I found this a very good one specially because of the images describing what is going on.

4

solved Hide “index.php” from URL and get parameters [duplicate]