pizzaboy Posted March 17, 2008 Share Posted March 17, 2008 Hey guys, I'm playing with the RewriteEngine in a .htaccess file buried away in a subdirectory on my site, and I'm experiencing some weird stuff that I don't know how to solve. I get the idea of rewrite rules and how to use them. I also understand the idea of DirectoryIndex. My problem is that Apache seems to be ignoring my rules, and displaying any page that has the same filename as the name of the directory. I'm sure there's something in a httpd.conf somewhere but I'm new to Apache and I don't know what to look for. Having to rename some .php files so that the rewrite engine works seems stupid. How can I stop this effect and get Apache to just do whatever rules I write in the .htaccess file? Quote Link to comment https://forums.phpfreaks.com/topic/96467-mod_rewrite-and-directoyindex/ Share on other sites More sharing options...
activeserver Posted March 17, 2008 Share Posted March 17, 2008 Hey guys, I'm playing with the RewriteEngine in a .htaccess file buried away in a subdirectory on my site, and I'm experiencing some weird stuff that I don't know how to solve. I get the idea of rewrite rules and how to use them. I also understand the idea of DirectoryIndex. My problem is that Apache seems to be ignoring my rules, and displaying any page that has the same filename as the name of the directory. I'm sure there's something in a httpd.conf somewhere but I'm new to Apache and I don't know what to look for. Having to rename some .php files so that the rewrite engine works seems stupid. How can I stop this effect and get Apache to just do whatever rules I write in the .htaccess file? I've myself faced many such issues, it needs inspection of 3-4 files (httpd.conf, .htaccess, php.ini sometimes, etc ). What would ease this multiple-file-inspection situation a lot is to make a PHP CLI script to dump relevant parts of these files onto a command window / shell / terminal. If you make a browser-based script, you're asking people to destroy your site GUI managers are great, those are a bit more tedious to write, IMO. Keep in mind that we're soon going to shift en masse to PHP5 and next year, to PHP6 This kind of utility will help Pros, cons, obvious flaws in this approach? Quote Link to comment https://forums.phpfreaks.com/topic/96467-mod_rewrite-and-directoyindex/#findComment-493898 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.