This is a discussion on mod_rewrite and / within the PHP Language forums, part of the PHP Programming Forums category; When you type in a url without a filename, e.g. www.google.com/, it automatically looks for index.php (...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
When you type in a url without a filename, e.g. www.google.com/, it
automatically looks for index.php (or whatever your web server is configured to look for). I am having the problem where my CMS is returning a page not found in this case. Try typing in http://www.quick2m.com/izzy -- you get 404 Try typing in http://www.quick2m.com/izzy/index.php -- you get the homepage Is this something I can fix with mod_rewrite? How would I write a rule that looks for a blank URL line and replaces it with index.php? thanks, Kevin |
|
|||
|
Kevin Audleman schrieb:
> When you type in a url without a filename, e.g. www.google.com/, it > automatically looks for index.php (or whatever your web server is > configured to look for). I am having the problem where my CMS is > returning a page not found in this case. > > Try typing in http://www.quick2m.com/izzy -- you get 404 > Try typing in http://www.quick2m.com/izzy/index.php -- you get the > homepage > > Is this something I can fix with mod_rewrite? How would I write a rule > that looks for a blank URL line and replaces it with index.php? No, this shouldn't normally happen. Check http://httpd.apache.org/docs/2.2/de/...directoryslash and Directory-Index-Setting. |
|
|||
|
Kevin Audleman wrote:
> When you type in a url without a filename, e.g. www.google.com/, it > automatically looks for index.php (or whatever your web server is > configured to look for). I am having the problem where my CMS is > returning a page not found in this case. > > Try typing in http://www.quick2m.com/izzy -- you get 404 > Try typing in http://www.quick2m.com/izzy/index.php -- you get the > homepage > > Is this something I can fix with mod_rewrite? How would I write a rule > that looks for a blank URL line and replaces it with index.php? > > thanks, > Kevin > alt.apache.configuration would be a much better place to ask this question. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|||
|
On Feb 20, 7:28*pm, Kevin Audleman <kevin.audle...@gmail.com> wrote:
> When you type in a url without a filename, e.g.www.google.com/, it > automatically looks for index.php (or whatever your web server is > configured to look for). I am having the problem where my CMS is > returning a page not found in this case. > > Try typing inhttp://www.quick2m.com/izzy-- you get 404 > Try typing inhttp://www.quick2m.com/izzy/index.php-- you get the > homepage > > Is this something I can fix with mod_rewrite? How would I write a rule > that looks for a blank URL line and replaces it with index.php? > > thanks, > Kevin Hi Kevin, I would suggest checking your apache httpd.conf file. Look for DirectoryIndex and it should be something like this: DirectoryIndex index.php index.xml index.html index.htm index.jsp This should then allow you to find those pages when you just type in e.g www.google.co.uk Regards Alex Alex Richards Ajtrichards Web Solutions http://www.ajtrichards.co.uk |