Re: RewriteMap questions

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

 



On Fri, 1 Jun 2007 08:57:06 -0400
"Joshua Slive" <joshua@xxxxxxxx> wrote:

> I can't tell at all what you are trying to accomplish here. Given
> you have the second set of rules, why is the first set of rules
> necessary at all? If people are redirected to the correct place,
> why do you then need to remap internally?

Sorry - the first block was meant to map/rewrite new URLs to existing
pages that all have the form sitepages/pid123.php - for example:

features.php => sitepages/pid123.php

This is a rewrite because features.php does not actually exist on disk
but maps to the file sitepages/pid123.php.  The second block then is
meant to serve as a redirect.  Basically the management wants to make
sure that anyone who still uses the old URL scheme gets redirected to
the new URL - so when someone browses to:

sitepages/pid123.php they get a redirect to features.php - which then
has to do the mapping.  Yeah it's kind of strange, but that's what
the customer wants I guess.

>From discussions on the mailing list previous to this I added the
"redirect_stop=yes" to the query string to prevent infinite redirect
loops. 

I have one mapping program that uses on map array:

'features.php' => 'sitepages/pid123.php',
'sitepages/pid123.php' => 'features.php',

So both rules can use the same RewriteMap, but I think I need two
rules because one is a 301 redirect and the other is not.

> Your problem with the [L] not working likely has to do with
> operating in .htaccess files instead of the main server config.
> mod_rewrite needs to reinject the request in order to make sure all
> the proper rules are applied.

I guess I could put this in a vhost file, but then I'd probably want
to check for the existence of the map file too as this URL rewriting
is a feature not everyone will buy.

Thanks,

Josh



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