htaccess rewriterule being ignored
Posted
by hookedonwinter
on Stack Overflow
See other posts from Stack Overflow
or by hookedonwinter
Published on 2010-04-20T18:00:22Z
Indexed on
2010/04/20
18:03 UTC
Read the original article
Hit count: 320
.htaccess
|rewriterule
I have an .htaccess file that is not working properly. And it used to.
Here is the file:
RewriteEngine On
# Category
#Edit
RewriteRule ^edit/([^/]+)/?$ /edit_solutions/index.php?category=$1 [L]
RewriteRule ^edit/?$ /edit_solutions/choose.php [L]
#Report
RewriteRule ^reports/([^/]+)/?$ /report/report.php?project=$1 [L]
RewriteRule ^reports/?$ /report/index.php
#View
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/?$ /view/index.php?category=$1
RewriteRule ^$ /view/choose.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
For some reason, links like mydomain.com/edit/butler/ are going to the view condition, not the edit condition. So the view is picking up the category as edit/butler/. Any ideas why the first condition isn't picking up that url correctly?
© Stack Overflow or respective owner