开发者

Zend Framework URL Rewriting Using Htaccess

开发者 https://www.devze.com 2023-04-02 12:36 出处:网络
Guys, I want to write a .htaccess rewrite rule in zend framwork. MY URL is http://www.somedomain.com:8090/hotel-profile

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消