急求:apache的rewrite功能怎么配置? 使用 .htaccess 放在要重写的目录。一般放到网站根目录。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 例如:编辑一个.htaccess文件内容:LoadModule rewrite_moduleRewriteEngine on RewriteRule /xxtx/([0-9]*).html /xxtx/a.php\?a=$1保存至根目录下则http://localhost/xxtx/123.htmlrewrite为http://localhost/xxtx/a.php?a=123 为什么我把.htaccess文件放到根目录下不行而写到httpd.conf中就可以 可能你http.conf文件中不允许使用.htaccess文件来修改apache的配置 看看httpd.conf的该目录下的allowOverRide是否为all 设置<Directory /> Options FollowSymLinks AllowOverride all</Directory>还不行呀为什么呀 <Directory /> Options FollowSymLinks AllowOverride all</Directory>windows吗?还是写物理路径吧linux写成/var/www/html这种形式 .htaccess这样写试试LoadModule rewrite_moduleRewriteEngine OnRewriteBase /RewriteRule /xxtx/([0-9]*).html /xxtx/a.php\?a=$1 如何限制验证码只可使用一次 IIS+PHP连接sqlserver问题!!!急急急 Linux系统下,如何在Apache2中指定php.ini的路径 如何只知道虚拟主机支不支持PDO库。在线等待 出一道题 php怎样读取url的参数? 请对CMS有了解的大侠来看看这个网站是什么程序做的 浏览器回退问题 无法连接MySQL server iis和nginx压力测试,发现nginx不如iis 我输入数据库的数据后,用phpmyadmin或MySQL监视器看都是乱码. PHP调用ATL动态库,ATL动态库能够跟踪调试吗
编辑一个.htaccess文件
内容:
LoadModule rewrite_module
RewriteEngine on
RewriteRule /xxtx/([0-9]*).html /xxtx/a.php\?a=$1保存至根目录下
则
http://localhost/xxtx/123.html
rewrite为
http://localhost/xxtx/a.php?a=123
而写到httpd.conf中就可以
<Directory />
Options FollowSymLinks
AllowOverride all
</Directory>
还不行呀
为什么呀
Options FollowSymLinks
AllowOverride all
</Directory>windows吗?还是写物理路径吧
linux写成/var/www/html这种形式
LoadModule rewrite_module
RewriteEngine On
RewriteBase /
RewriteRule /xxtx/([0-9]*).html /xxtx/a.php\?a=$1