views:

23

answers:

1

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?

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

A: 

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

hookedonwinter