httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Brown" <d...@zu.com>
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 /

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

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
browser.
All I seem to get is the error "RewriteRule: bad flag delimiter" no matter
what I try.


----
Dan Brown
danb@zu.com


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message