1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

RewriteRule not working for subfolder

Discussion in 'Apache' started by Nediam, Oct 25, 2005.

  1. #1
    hi all.

    I'm having problem with the RewriteRule:

    I have 8 virtual hosts in my Apache,
    here is a part taking from httpd.conf showing one of them:

    <VirtualHost *:80>
    ServerAdmin webmaster@domain.com
    DocumentRoot c:\\www\\domain.com\\htdocs
    ServerName www.domain.com
    ServerAlias domain.com
    ErrorLog c:\\www\\domain.com\\logs\\error.log
    CustomLog c:\\www\\domain.com\\logs\\acces.log common

    RewriteEngine on
    RewriteRule ^/$ http://www.domain.com:8888/yyy/$1 [P]
    RewriteRule ^/(.*)$ http://www.domain.com:8888/yyy/$1 [P,L]

    </VirtualHost>

    When I go to the url http://www.domain.com I get the right page and the browser url does not change,
    but if I go to a subfolder on the url e.g. http://www.domain.com/admin I get the right page, but the url in the browser changes to http://www.domain.com:8888/yyy/admin/

    any sugestions how I can change this so I can access subfolders without the url changing in the broser?

    thanks
    Nediam
     
    Nediam, Oct 25, 2005 IP