Tha*_*nks 6 php .htaccess kohana
2个小时后,我无法做对.
Kohana安装可直接在我的域名下访问,即" http://something.org/ "
而不是http://something.org/index.php/welcomde/index我希望有http://something.org/welcome/index这样的网址
我的.htaccess完全搞砸了.它实际上是下载附带的标准example.htaccess.这几乎没用.在kohana页面上有一个教程"如何删除index.php".它也没用,因为它甚至不会谈论如何删除它.完全令人困惑.
请问,有人可以提供他的工作.htaccess用于标准的kohana安装吗?
我的htaccess看起来像是一个例子.
RewriteEngine On
RewriteBase /
RewriteRule ^(application|modules|system) - [F,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
Run Code Online (Sandbox Code Playgroud)
但是您还必须将config.php文件更改为:
$config['index_page'] = '';
Run Code Online (Sandbox Code Playgroud)
这是我们的.htaccess文件,它现在似乎正在运行.
RewriteEngine On
# 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,L]
Run Code Online (Sandbox Code Playgroud)
请注意,我们的应用程序,系统和模块目录都在Web根目录之外.