mod_rewrite - ensuring consistency between HTTP_HOST and REQUEST_URI

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

 



Hi,

In a project we are trying to do some sanity checking on the URLs before they
hit our CMS.

We would like to make sure that a certain part of our REQUEST_URI matches a
coresponding HTTP_HOST.

For that we have two maps.

One with HTTP_HOST and the URI-part, ie.

  host1.example.com  uriA
  host2.example.com  uriB
  ...

And the other map with the opposite direction:

  uriA  host1.example.com
  uriB  host2.example.com
  ...


We would like to make sure that a URL is always build up like

  http://host1.example.com/something/uriA/

or

  http://host2.example.com/something/uriB/

And if not a URL like

  http://host1.example.com/something/uriB/

should be redirected to

  http://host2.example.com/something/uriB/


Unfortunately we haven't come up with a usable combination of
RewriteRule/-Cond/-Map.

Any hints?

Kind regards,
Arne


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