The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Mod_rewrite - Document Root Question

Discussion in 'General Discussion' started by noimad1, Jul 21, 2005.

  1. noimad1

    noimad1 Well-Known Member

    Joined:
    Mar 27, 2003
    Messages:
    627
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    I am trying to help a customer out with a mod_rewrite issue. First, here is his .htaccess file:

    PHP:
    # Set up mod_rewrite
    Options +FollowSymLinks
    RewriteEngine on
    #
    # Rules follow
    #
    # For use in .htaccess (per directory)
    RewriteRule ^1\.php$ /index.php [L]
    Now, when he tries to go to the 1.php file it says file not found? When I check the error log it shows an error like this:

    File does not exist: home/h4server/public_html/h4/home/bullnot/public_html/bull/check/index.php

    Now, that /home/h4server/public_html/h4 part is the actuall path to my document root on the server, as defined by the first entry in my httpd.conf file:

    PHP:

    <VirtualHost myipaddress>
    BytesLog domlogs/h4logs.com-bytes_log
    ServerName h4
    .myservername.com
    DocumentRoot 
    /home/h4server/public_html/h4/
    </
    VirtualHost>
    So I guess the question is do I have this setup correctly or not? I wouldn't think I would want to make the document root for the server / ? That doesn't seem secure? However, why does it keep trying to use that document root with his site anyways? I mean his document root should be his as defined in the httpd.conf file correct?

    Any help would be appreciated.

    Regards,
    Damion
     
  2. noimad1

    noimad1 Well-Known Member

    Joined:
    Mar 27, 2003
    Messages:
    627
    Likes Received:
    0
    Trophy Points:
    16
    Bump...

    Anyone able to help on this one?
     
Loading...

Share This Page