I have tinycms application and how could I forward all traffic to document root?
Example:
http://<IP-address>/ADFADSF/adsfadsf --> /
http://domain.com/adsf --> /
Currently, I have this in my .htaccess
<Files .htaccess>
order allow,deny
deny from all
</Files>
Options +FollowSymLinks
RewriteRule admin/$ index.php?view=admin [QSA]
Options -Indexes
Thanks.
James
Using mod_rewrite:
Using mod_alias:
This will,m of course, render the
RewriteRule admin/$ index.php?view=admin [QSA]rule useless, or at the very least, cause some conflicts. So you should either comment that rule out, or create a special exception where all traffic exceptadmin/gets redirected.EDIT:
Here’s one way to do it, I’m only guessing that this is the behavior you want. This stuff does not change, it’s fine the way it is:
Add a:
Then:
So putting all that together, you have the deny for accessing .htaccess files. Then you have your
Options, then your rewrite rules. You need to turn the RewriteEngine on, then redirect any request that isn’t/index.phpor/admin, then internally rewrite/adminto/index.php.