【发布时间】:2015-10-23 11:26:24
【问题描述】:
我对 Kohana 框架中的 URL 有疑问。
当我输入 mydomain.xyz/admin 时,重定向到 mydomain.xyz//admin 并从 Kohana 核心返回一些错误。
这是我.htacces的一部分:
RewriteEngine On
RewriteBase /
RewriteCond $1 ^(index\.php|robots\.txt|favicon\.ico|media)
RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?kohana_uri=$1 [L]
###### Add trailing slash (optional) ######
RewriteCond %{REQUEST_URI} ^/[^\.]+[^/]$
RewriteRule ^(.*)$ $1/ [R=301,L]
RewriteRule ^(.*)public_html/index.php/(.*)$ http://mysite.xyz/$1$2 [R=301,L]
从其他服务器移动站点后出现该问题。
【问题讨论】:
标签: .htaccess url mod-rewrite kohana