Reputation: 157
I'm actually developping a small php website (only php, no java) and I would like to figure out something.
When I have this url called URL A: http://www.domain.com/?toto, everything's working I would like to rewrite it to http://www.domain.com/toto (called URL B) but when I tried, I have a 404 page not found.
What do I have to use to tell apache, when you have URL B it's an alias of URL A ??
It tried proxypass, Rewrite rules without reaching my aim. Can someone help me please?
Thx a lot !!!
Upvotes: 0
Views: 319
Reputation: 9142
You need to use Apache's mod_rewrite
.
A simple rewrite rule can be placed in your .htaccess file (untested):
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) /index.php?$1 [L]
Upvotes: 1