0
改寫爲移動控制器我試圖在htaccess的需要在Kohana中
mobile.domain.com/mobile/function
改寫爲mobile.domain.com/function
我想下面的工作,但它認爲,功能的控制器。
# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase/
# Protect hidden files from being viewed
<Files .*>
Order Deny,Allow
Deny From All
</Files>
# Protect application and system files from being viewed
RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT]
# Rewrite for Mobile
RewriteCond %{HTTP_HOST} ^mobile\.domain\.com$ [NC]
RewriteCond %{REQUEST_URI} !mobile [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /mobile/$1 [L]
這沒有效果 – kbrin80 2010-09-08 19:08:51
@ kbrin80編輯,現在檢查。 – aularon 2010-09-08 19:18:32