开发者

htaccess rewriterule being ignored

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/choos开发者_如何学Pythone.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?

Edit: I just checked the $_GET contents, and the category is being set to error.html.


I found out the problem wasn't in fact the htaccess file. There was a file called edit.old.php that was somehow being called. I renamed it to old.edit.old.php (good name, I know), and the site works fine now. Leaving this up for reference

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜