我必須使用htaccess
重定向。請幫助我。 從這個 URL :- http://xxx/CCKCHT/
重定向它htaccess重定向到另一個文件夾
URL :- http://xxx/CCKCHT/lhc_web/index.php/site_admin/
我必須使用htaccess
重定向。請幫助我。 從這個 URL :- http://xxx/CCKCHT/
重定向它htaccess重定向到另一個文件夾
URL :- http://xxx/CCKCHT/lhc_web/index.php/site_admin/
啓用mod_rewrite的,並通過httpd.conf
的.htaccess,然後把這個代碼在你.htaccess
下DOCUMENT_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]
所以,你想從重定向:'/ CCKCHT/foo'到'/ CCKCHT/lhc_web/index.php/site_admin/foo'? – anubhava
@anubhava是的,我想要這個 –