Forum Moderators: phranque
I would like to know if it is possible to put something in the htaccess file so index.php/engine/ will be invisible to my users.
Thanks
Brakkar
Yes and no. mod_rewrite won't do this by itself, but it's one-half of the solution.
First change all the links* on all of your pages to eliminate the index.php/engine part of the URL. These links will now no longer point to a 'real file' when a user clicks on one.
So then we use mod_rewrite to 'fix' these URLs when they are requested from your server:
RewriteCond /index.php/engine%{REQUEST_FILENAME} -f
RewriteRule ^(.+)$ /index.php/engine/$1 [L]
Also, it would be far more efficient if you could 'tag' these URLs that need to be rewritten, rather than using the 'file exists' test as shown. For example, use on-page links like /rl/<something> so that the rewrite code can simply look for the "rl/" prefix on a URL to know if it needs to be rewritten or not.
* Obviously, you should only change a few in order to test this method before changing all the links.
Jim