使用.htaccess更改URL结构

时间:2011-02-02 12:40:14

标签: .htaccess mod-rewrite

我的.htaccess文件中有以下代码

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/\.]+)/?$ index.php?story=$1 [L]

当我在localhost工作时,它成功地将网址http://localhost/test/1转换为http://localhost/test/index.php?story=1

之类的内容

我在云端上传了相同的代码,但在尝试访问www.domain.com/1这样的网址时,却显示了404。

我需要配置额外的内容才能使其正常工作?

0 个答案:

没有答案
相关问题