[thelist] Apache ReWrite

James Mclean james at adam.com.au
Sun Jun 23 03:10:01 CDT 2002


I am building a site in PHP, and using a method to make the site search
engine friendly. I have built sites based on this code on a production
Cobalt server, but on my debian box running the latest 1.3 apache built from
source, it does not allow me to call a file called index.php, as index. (ie
www.gamingsa.com/index/home/ or www.gamingsa.com/index/ )

I am pretty sure that the cobalt server uses a rewrite rule to achieve this,
and not a .htaccess as it is global.

this is want i have "borrowed" from that server, but this does not work...

    RewriteEngine on
    RewriteCond %{HTTP_HOST}                !^xxx.xxx.xxx.xxx(:80)?$
    RewriteCond %{HTTP_HOST}                !^www2.website.com(:80)?$
    RewriteRule ^/(.*)                      http://www2.website.com/$1 [L,R]
    RewriteOptions inherit

(xxx.xxx.xxx.xxx is the ip, i have removed it :), website.com is not the
url, changed also :) )

it is inside a virtualhost directive.

i do not want to use files wirth no extension, as described in many how
to's.

Any Ideas people?

Cheers




More information about the thelist mailing list