Re: [users@httpd] Should be easy RewriteRule issue: mod_rewrite.

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

 



On 10/21/05, Andoni <andonilist@xxxxxxxxxx> wrote:
> Can you please help me with this RewriteRule. I am trying to all users of my
> website to type in:
>
> www.mysite.com/area1
>
> and have it re-written to:
>
> www.mysite.com/servMainSite?inner=area1
>
> The slight complication is that /img, /css and /menu have to work as of
> course does /servMainSite. At the moment I am getting an infinite loop with
> the following:
>
> #  RewriteRule !^/(servMainSite.*|img.*|css.*|menu.*)/
> /servMainSite?inner=$1 [R,L]

There are several ways to do this.  Here's one:

RewriteEngine On
RewriteCond %{Request_URI} !^/img
RewriteCond %{Request_URI} !^/css
...
RewriteRule ^/(.*) ^/servMainSite?inner=$1 [QSA,L]

Joshua.

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