Reputation:
I have the following htaccess:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^models$ index.php [L]
RewriteRule ^post$ index.php?action=post [L]
and a folder named models
.
The problem is: Apache sends me into the folder. With "post" the redirect rule works as there is no folder named post.
EDIT:
I forgot to tell that there is htaccess in models folder too, with:
Deny from all
Upvotes: 0
Views: 626
Reputation: 850
disable MultiViews in your apache configuration file. adding "Options -MultiViews" to your .htaccess might work too.
Upvotes: 0
Reputation: 1477
If you can accept a trailing slash after models, I think this would work.
RewriteEngine On
RewriteRule ^models/?$ index.php [L]
RewriteRule ^post$ index.php?action=post& [L]
Upvotes: 1