2013-07-23 64 views
1

我必須使用htaccess重定向。請幫助我。 從這個 URL :- http://xxx/CCKCHT/ 重定向它htaccess重定向到另一個文件夾

URL :- http://xxx/CCKCHT/lhc_web/index.php/site_admin/ 
+0

所以,你想從重定向:'/ CCKCHT/foo'到'/ CCKCHT/lhc_web/index.php/site_admin/foo'? – anubhava

+0

@anubhava是的,我想要這個 –

回答

1

啓用mod_rewrite的,並通過httpd.conf的.htaccess,然後把這個代碼在你.htaccessDOCUMENT_ROOT目錄:

Options +FollowSymLinks -MultiViews 
# Turn mod_rewrite on 
RewriteEngine On 
RewriteBase /CCKCHT/ 

RewriteRule (?!^lhc_web/index\.php/site_admin/)^(.*)$ /CCKCHT/lhc_web/index.php/site_admin/$1 [L,R=301,NC] 
+0

感謝它的工作 –

+0

非常歡迎,很高興它爲你工作。 – anubhava

+0

仍然無法正常工作..我還沒有正確測試 –

相關問題