url rewrite problem ??
Posted: Mon Feb 16, 2009 11:14 am
hello forums !!
CASE:
I want to have the url
1> http://mysite.com/admin -> admin/index.php?q=admin/login
(Note: if there is no any segment after admin it should be routed to admin/login)
2> http://mysite.com/admin/any -> admin/index.php?q=admin/any
And I performed the following for the url rewriting
this is only working for 2> case
i would like to know how to handle for case 1> too ?
Any idea?
Thanks
CASE:
I want to have the url
1> http://mysite.com/admin -> admin/index.php?q=admin/login
(Note: if there is no any segment after admin it should be routed to admin/login)
2> http://mysite.com/admin/any -> admin/index.php?q=admin/any
And I performed the following for the url rewriting
Code: Select all
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^admin\/(.*)$ admin/index.php?q=admin/$1 [QSA,L]i would like to know how to handle for case 1> too ?
Any idea?
Thanks