mod rewrite...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 

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@xxxxxx


---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux