RewriteRule to only affect first segment
Posted
by mschoening
on Server Fault
See other posts from Server Fault
or by mschoening
Published on 2010-05-17T16:04:56Z
Indexed on
2010/05/17
16:11 UTC
Read the original article
Hit count: 141
.htaccess
I have the following RewriteRule in place. This rewrites everything that starts with mac
, linux
or windows
:
RewriteCond $1 ^(mac|linux|windows) [NC]
RewriteRule ^(.*)$ /index.php/site/index/$1 [L]
Unfortunately this also rewrites /mac/test/testing
. How can I prevent it from applying if there is another segmend after /mac
?
© Server Fault or respective owner