|
Posted by Chung Leong on 03/03/06 01:24
joelbyrd@gmail.com wrote:
> Oh! Duh! Yes, of course - that makes perfect sense. I guess the only
> reason I was thinking about using an intermediary redirect page was to
> do any other pre-processing that might be necessary. For example, if
> the "name" is "admin", then I would have the redirect page redirect the
> user to the actual admin folder since in this case, this is not a
> user's profile page, but an administrator trying to access the backend.
> But, I guess this should probably be done using a RewriteCond?
> Something like:
>
> RewriteCond %{REQUEST_URI} !^admin.*$
>
> Or something like that (I'm not too familiar with the syntax, although
> I am somewhat familiar with regular expressions).
It's easier to handle this special case by putting another rewrite rule
ahead of the one dealing with the profile page.
RewriteRule ^/admin/?$ /admin_page.php [L]
RewriteRule ...
The [L] flag tells mod_rewrite to not apply the subsequent rules.
[Back to original message]
|