【发布时间】:2009-11-02 21:48:21
【问题描述】:
我当前的 .htaccess:
<IfModule mod_rewrite.c>
# Turn on URL rewriting
RewriteEngine On
# Put your installation directory here:
# If your URL is www.example.com/, use /
# If your URL is www.example.com/kohana/, use /kohana/
RewriteBase /
# Do not enable rewriting for files or directories that exist
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# For reuests that are not actual files or directories,
# Rewrite to index.php/URL
RewriteRule ^(.*)$ index.php/$1 [PT,L]
</IfModule>
当有人导航到:
我希望他们转到实际文件夹。当有人导航到:
http://mysite.com/demo 我希望他们去 index.php/$1。
我怎样才能做到这一点?
【问题讨论】:
-
应该移到 serverfault.com
标签: .htaccess mod-rewrite