Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    166
    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:
    166
    Bump...

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

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice