Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/240.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.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
Php 如何在wamp 2.4中使用mod rewriter或.htaccess重写url_Php_.htaccess_Mod Rewrite_Url Rewriting - Fatal编程技术网

Php 如何在wamp 2.4中使用mod rewriter或.htaccess重写url

Php 如何在wamp 2.4中使用mod rewriter或.htaccess重写url,php,.htaccess,mod-rewrite,url-rewriting,Php,.htaccess,Mod Rewrite,Url Rewriting,我正试图从localhost/fnw/detail.php重写我的url?cat=2&subcat=4&title=lol%20check%20&aid=5 到 localhost/fnw/lol%20check%20.html 在过去的三天里,我在网上搜索了一下,却找不到答案。我已经从wamp菜单中启用了rewrite_mod选项,还从httpd.conf文件中的LoadModule rewrite_modules/mod_rewrite.so中删除了#标记。我还尝试使用mod rewrite

我正试图从localhost/fnw/detail.php重写我的url?cat=2&subcat=4&title=lol%20check%20&aid=5

localhost/fnw/lol%20check%20.html

在过去的三天里,我在网上搜索了一下,却找不到答案。我已经从wamp菜单中启用了rewrite_mod选项,还从httpd.conf文件中的LoadModule rewrite_modules/mod_rewrite.so中删除了#标记。我还尝试使用mod rewrite generater工具重写url,它给了我下面的代码来在.htaccess文件上编写

RewriteEngine On
RewriteRule ^([^/]*)\.html$ /fnw/detail.php?cat=2&subcat=4&title=$1&aid=5 [L]

它不起作用。有人能帮我解决这个问题吗?我是否错过了wamp上需要更改的内容。我在这方面是全新的,期待着帮助。提前谢谢。:)

选项+FollowSymlinks

重新启动发动机

重写COND%{REQUEST_METHOD}^TRACE

重写规则。*-[F]


重写规则^([a-zA-Z0-9-]*)/([a-zA-Z0-9]+)?$index.php?PG=$1&NID=$2

我对WAMP也有类似的问题。这是
mod_rewrite
的一个问题。快速检查它是否工作<代码>删除此项。如果返回内部服务器错误或错误代码500。这是mod_rewriteie无法处理您的WAMP。 而不是通过这样做来打开它
Wamp->Apache->Apache模块->重写模块

请说得更具体些:“它不起作用了。”没有说太多。这是什么意思?什么都没发生?发生了错误的事情?发生错误了吗?宇宙内爆?