Zend Framework URL Rewriting Using Htaccess
Guys,
I want to write a .htaccess rewrite rule in zend framwork.
MY URL is http://www.somedomain.com:8090/hotel-profile
I want to redirect this URL to http://www.somedomain.com:8090/disabled
So to achieve this goal I have added following to my existing .htaccess file.
Rewr开发者_JS百科iteRule ^hotel-profile$ /disabled
But it is not working for me.
my .htaccess files looks like:
RewriteEngine On
RewriteBase /
RewriteRule ^hotel-profile$ /disabled
# Activate Zend Framework.
RewriteCond %{SCRIPT_FILENAME} !-s
RewriteCond %{SCRIPT_FILENAME} !-l
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^.*$ index.php [NC,L]
Thanks.
Why don't you use a plugin which use a predispatch method? This could be usefull if you want to add more redirects like this.
精彩评论