httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Andersson" <rob...@profundis.nu>
Subject Re: Redirecting confusion :(
Date Mon, 05 Aug 2002 06:03:46 GMT
Ian wrote:
> Hi,
>
> Can someone kindly point me in the right direction to improve the way
> that I am redirecting users?
>
> I currently use the following in .htaccess
>
> Redirect permanent  /dir/group1
> http://www.domain.net/dir/forums.php?Cat=1,39,126,129,130
> Redirect permanent  /dir/group2
> http://www.domain.net/dir/forums.php?Cat=1,34,110,129,130
> Redirect permanent  /dir/group3
> http://www.domain.net/dir/forums.php?Cat=1,3,128,129,130
>
> Now whilst this works - I could potentially have a few hundred of these
> in the .htaccess file. The other problem is that if anyone puts
> http://www.domain.net/dir/group1/ in their browser the user gets an
> error :( The same /dir/ physically exists on both sides, whilst the
> group1, group2 etc., do not physically exist.
>
> The reason why I need this is that the resulting URL alters (the digits
> change) on a fairly frequent basis.
>
> Question - can I improve the way that I do this to -  eliminate the
> error if they put a / after the URL
>
> And if possible to mask the eventual URL so that users do not bookmark
> it - probably impossible :)

Then, I believe, you should use Alias or AliasMatch instead.

The slash thing should be avoidable if you in the matching part puts a
trailing slash, or if you use AliasMatch you can make that optional, such
as:
AliasMatch ^/dir/group3/?$ /dir/forums.php?Cat=1,3,128,129,130
(or something similar)

Regards,
Robert Andersson


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message