我想htaccess的重寫任何指向index.php /視圖/不管
domain.com/whatever
指向
domain.com/index.php/view/whatever
用戶仍然會看到在瀏覽器domain.com/whatever
但幕後它會被瀏覽domain.com/index.php/view/whatever
。
我想htaccess的重寫任何指向index.php /視圖/不管
domain.com/whatever
指向
domain.com/index.php/view/whatever
用戶仍然會看到在瀏覽器domain.com/whatever
但幕後它會被瀏覽domain.com/index.php/view/whatever
。
在域的根目錄試試這個.htaccess文件中
RewriteEngine On
RewriteBase/
#for all subdomains of domain.com
RewriteCond %{HTTP_HOST} ^(.+)\.domain\.com$ [NC]
RewriteCond %{REQUEST_URI} !^/index\.php/view.*$ [NC]
RewriteRule ^(.*)$ index.php/view/$1 [L]
是,上視圖的index.php即'的index.php?查看參數='或'是的index.php \查看'所有目錄? –
@ulrich它就像你看到它'index.php/view' – Pinkie