mod_rewrite and /

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 (...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2008
Kevin Audleman
 
Posts: n/a
Default mod_rewrite and /

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
Reply With Quote
  #2 (permalink)  
Old 02-20-2008
Jonas Werres
 
Posts: n/a
Default Re: mod_rewrite and /

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.
Reply With Quote
  #3 (permalink)  
Old 02-20-2008
Jerry Stuckle
 
Posts: n/a
Default Re: mod_rewrite and /

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
==================

Reply With Quote
  #4 (permalink)  
Old 02-21-2008
ajtrichards@googlemail.com
 
Posts: n/a
Default Re: mod_rewrite and /

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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:33 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0