mod_rewrite and /

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kevin Audleman

    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
  • Jonas Werres

    #2
    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

    and Directory-Index-Setting.

    Comment

    • Jerry Stuckle

      #3
      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.conf iguration would be a much better place to ask this question.

      --
      =============== ===
      Remove the "x" from my email address
      Jerry Stuckle
      JDS Computer Training Corp.
      jstucklex@attgl obal.net
      =============== ===

      Comment

      • ajtrichards@googlemail.com

        #4
        Re: mod_rewrite and /

        On Feb 20, 7:28 pm, Kevin Audleman <kevin.audle... @gmail.comwrote :
        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

        Comment

        Working...