Reply to Re: seeking mod_rewrite solution

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация