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.

Fake URLs, RewriteEngine and Addon Domains

Discussion in 'General Discussion' started by rossdev, Oct 8, 2003.

  1. rossdev

    rossdev Registered

    Joined:
    Jan 31, 2003
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I need some help here.

    I am using this a .htaccess file to create "nice" URLs for my php variables.

    .htaccess:
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} -d [OR]
    RewriteCond %{REQUEST_FILENAME} -s
    RewriteRule ^.*$ - [L]
    RewriteRule ^(.*)$ index.php [L]

    When I access a page like this:
    something.com/addon/var1/var2/
    The variables pass correctly to the script.

    BUT when I access a page like this:
    addon.com/var1/var2/
    The variables don’t pass over to the script.

    Any ideas?

    Brian.

    cPanel.net Support Ticket Number:

    cPanel.net Support Ticket Number:
     
  2. mickeymouse

    mickeymouse Well-Known Member

    Joined:
    Sep 16, 2003
    Messages:
    389
    Likes Received:
    0
    Trophy Points:
    16
    Dear rossdev,

    The RewriteBase should be at the top of the RewriteRules and then put in the documentation (or document it in the .htaccess file) to modify the RewriteBase if they use a subdirectory.The default .htaccess seems to be wrong. Please refer

    http://httpd.apache.org/docs/vhosts/mass.html for an efficient mod_rewrite module.

    Regards,
     
Loading...

Share This Page