httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Brown" <>
Subject [users@httpd] mod rewrite...
Date Mon, 26 Nov 2007 00:20:46 GMT

I don't deal with rewrite rules very often so I've got a bit of trouble
getting this going.  I'm converting a number of sites over to PHP5 from
PHP4.  A second instance of Apache with PHP4 is running on my server to
accommodate sites still not tested/converted to PHP5.  This is part of an
htaccess file.  The code between the two comments works fine on sites which
don't already use mod_rewrite but gives an internal server error on sites
with existing mod_rewrite rules like this.

RewriteEngine On
RewriteBase /

RewriteCond %{SERVER_PORT}  ^81$
RewriteRule ^(.*)           /$1  [S=3]
RewriteCond /sites/WCW/www/htdocs/.php4 -f RewriteCond %{SERVER_PORT}  ^80$
RewriteRule ^(.*)           http://%{HTTP_HOST}:81/

RewriteRule index.php.* - [L]
RewriteRule ^common.*$ - [L]
RewriteRule ^media.*$ - [L]
RewriteRule ^admin.*$ - [L]
RewriteRule ^(.*) /index.php/$1

These sites handle all URLs through index.php and rewrite the URL for the
All I seem to get is the error "RewriteRule: bad flag delimiter" no matter
what I try.

Dan Brown

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message