3 ms·
Yes, there is a way by rewriting (not redirect) the url. RewriteEngine on RewriteCond %{REQUEST_URI} !^/index.php RewriteRule ^/(.*) /index
by ars 15y ago
Yes, there is a way by rewriting (not redirect) the url.
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/index.php
RewriteRule ^/(.*) /index.php/$1
I didn't test it, but it's probably as simple as that.
But that's not what I meant. Instead of having index.php look at the url parameters and include the proper controller, just directly execute that controllers .php file. Make a file that you include in each controller that does any prep work you need and that's it, let apache execute the controller directly.
- roel_v 15y agoYes, using mod_rewrite is what I've been doing for years. My question was on the second situation - how do you let Apache execute the controller directly?