RewriteEngine on
RewriteBase /
RewriteRule ^city/([a-zA-Z0-9\-\(\)]+)$ city.php?id=$1上面这写法,www.xxx.com/city/boston应该变成www.xxx.com/city.php?id=boston
可以进入city.php这个页面,但读不了id参数,为什么?
后来我干脆把RewriteRule ^city/([a-zA-Z0-9\-\(\)]+)$ city.php?id=$1删除了,奇怪的是还起作用,这样city/boston还会进入city.php页面,为什么?RewriteRule我都删除了,怎么还这样?难道使用过一次就永远起作用的吗?怎么搞?
RewriteBase /
RewriteRule ^city/([a-zA-Z0-9\-\(\)]+)$ city.php?id=$1上面这写法,www.xxx.com/city/boston应该变成www.xxx.com/city.php?id=boston
可以进入city.php这个页面,但读不了id参数,为什么?
后来我干脆把RewriteRule ^city/([a-zA-Z0-9\-\(\)]+)$ city.php?id=$1删除了,奇怪的是还起作用,这样city/boston还会进入city.php页面,为什么?RewriteRule我都删除了,怎么还这样?难道使用过一次就永远起作用的吗?怎么搞?
RewriteRule ^city/([a-zA-Z0-9\-\(\)]+)$ ababab.php?id=$1
还会进入city.php页面,为什么这样啊,崩溃啊
RewriteLog logs/rewrite.log
RewriteLogLevel 9
————————————————————————————————
基于CSDN论坛提供的插件扩展功能,自己做了个签名档工具,分享给大家,欢迎技术交流 :)
root@u008:~# /usr/local/apache/bin/apachectl stop
-bash: /usr/local/apache/bin/apachectl: No such file or directory
root@u008:~# /etc/apache2/bin/apachectl stop
-bash: /etc/apache2/bin/apachectl: No such file or directory
root@u008:~# /usr/local/apache2/bin/apachectl stop
-bash: /usr/local/apache2/bin/apachectl: No such file or directory
root@u008:~# apachectl -v
-bash: apachectl: command not found
root@u008:~# apachectl -c
-bash: apachectl: command not found
root@u008:~# apachectl --c
-bash: apachectl: command not found
root@u008:~# rpm -q httpd
-bash: rpm: command not found
root@u008:~# rpm -q
-bash: rpm: command not found
root@u008:~#
root@u008:~# ps -e | grep httpd
root@u008:~#
root@u008:~# ps -e | grep httpd
root@u008:~#
root@u008:~# ps -e | grep httpd
root@u008:~# ps -ef|grep httpd
root 13021 12744 0 13:34 pts/0 00:00:00 grep httpd
root@u008:~# ps -e|grep httpd
root@u008:~# 你们看我搞一通后什么都没得到
后来我干脆把RewriteRule ^city/([a-zA-Z0-9\-\(\)]+)$ city.php?id=$1删除了,奇怪的是还起作用,这样city/boston还会进入city.php页面,为什么?RewriteRule我都删除了,怎么还这样?难道使用过一次就永远起作用的吗?怎么搞?起作用是因为没有重启WEB服务器,对于.htaccess文件的修改,要生效必须要重启WEB服务器
我下的是2.2.17,可能是版本比较新?