adrianTNT Posted May 28, 2010 Share Posted May 28, 2010 Hello, I have a strange problem with mod rewrite, this rewrite rule shows 404 error: RewriteRule ^admin(/)?$ admin.php as long as the .php file is named the same. But if I rename existent file on server to something like admins.php and rewrite "admin/" to admins.php then it works ok. It looks like I would not be able to rewrite "path/" if path.php exists I am using a "grid" hosting account from Godaddy. These rules worked fine on some dedicated servers from where I got the site files. Quote Link to comment https://forums.phpfreaks.com/topic/203240-cannot-rewrite-path-if-pathphp-exists/ Share on other sites More sharing options...
cags Posted May 29, 2010 Share Posted May 29, 2010 I think this is a problem with Apache Content Negotiation, but to be honest I've never ran into it myself so not sure how to fix it, perhaps disabling mod_negotiation. Try checking the documentation at http://httpd.apache.org/docs/2.0/content-negotiation.html. Quote Link to comment https://forums.phpfreaks.com/topic/203240-cannot-rewrite-path-if-pathphp-exists/#findComment-1064959 Share on other sites More sharing options...
adrianTNT Posted May 29, 2010 Author Share Posted May 29, 2010 I also seen this... I have files as: /image_files/120.jpg and if I access same path without it's extension it still shows the file. That happens with no rewrite rules from my end, I deleted the .htaccess to test this. Let me know if this indicates any other issue, otherwise I am waiting for GoDaddy's answer and inform them about this other thing if needed. Looks like it is from their configuration, it is not a dedicated server so my access to settings is limited. Quote Link to comment https://forums.phpfreaks.com/topic/203240-cannot-rewrite-path-if-pathphp-exists/#findComment-1064960 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.