Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess mod_rewrite无法使用我的简单url_.htaccess_Mod Rewrite - Fatal编程技术网

.htaccess mod_rewrite无法使用我的简单url

.htaccess mod_rewrite无法使用我的简单url,.htaccess,mod-rewrite,.htaccess,Mod Rewrite,问题是,我无法使用mod_重写更改我的URL,我拥有的URL是: http://example.org/files/news.php?news=180 我希望看到这样的情况: http://example.org/files/news/180 我尝试过以下代码(每一条规则): 没什么,代码应该是什么样子??谢谢将此代码放入/files/.htaccess: ErrorDocument 404 http://mysite.org/notfound.php Options +Indexes

问题是,我无法使用mod_重写更改我的URL,我拥有的URL是:

http://example.org/files/news.php?news=180

我希望看到这样的情况:

http://example.org/files/news/180
我尝试过以下代码(每一条规则):


没什么,代码应该是什么样子??谢谢

将此代码放入
/files/.htaccess

ErrorDocument 404 http://mysite.org/notfound.php

Options +Indexes +FollowSymlinks -MultiViews
RewriteEngine on
RewriteBase /files/

RewriteRule ^news/([^/.]+)/?$ news.php?news=$1 [L,QSA]
ErrorDocument 404 http://mysite.org/notfound.php

Options +Indexes +FollowSymlinks -MultiViews
RewriteEngine on
RewriteBase /files/

RewriteRule ^news/([^/.]+)/?$ news.php?news=$1 [L,QSA]