I have a FrontController expecting two $_GET params:
controller
action
A typical call to the site would look like this:
What I want to do is to allow the user to visit this site by the following url:
What I’ve tried:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.+)/(.+)$ index.php?controller=$1&action=$2 [L,QSA]
</IfModule>
Since this gives me 404 Errors it doesn’t seem to work.
mod_rewrite itself is enabled on the server.
The
.htaccessyou posted works for me:You might want to try an absolute path to
index.phprather than a relative one.Regardless, that regex will result in:
You’d be better off doing:
And having your
index.phpsplit up the$_GET['url']into controller, action, args, etc…