雪豹上的mod_rewrite 404

时间:2011-02-10 07:36:38

标签: .htaccess mod-rewrite osx-snow-leopard

我的vhost:

Options +Indexes +FollowSymlinks
AllowOverride All
Order allow,deny
Allow from all

htaccess的:

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteBase /
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]*)/([^/]*)$ /?id=$1&v=$2 [L]
</IfModule> 

我的网址看起来像这样

http://hatchpass.local/?id=fbb43&v=minimal

在Apache中启用了mod_rewrite并且我已经确认它加载,但是,当我尝试像http://hatchpass.local/fbb43这样的东西时,我得到了404。

思想?

1 个答案:

答案 0 :(得分:0)

RewriteRule中的正则表达式与foo/bar匹配。 URL(“http://hatchpass.local/fbb43”)不适用于此。它只是作为“fbb43”传入。