PHPWind 5.3 Beta
Apache/2.4.23
PHP版本号: 5.4.45 GDLibrary: 支持
MySql版本: 5.50
=================================================
DocumentRoot "C:\Phpstudy\WWW"
<Directory />
Options +Indexes +FollowSymLinks +ExecCGI
AllowOverride All 开启了
Order allow,deny
Allow from all
Require all granted
</Directory>
LoadModule rewrite_module modules/mod_rewrite.so开启了...
===========================================
.htaccess写法↓
RewriteEngine On
RewriteBase /
RewriteRule ^newsshow-([0-9]+)-([0-9]+).html$ newsshow.php?id=$1&cid=$2
RewriteRule ^about-([0-9]+)\.html$ about.php?cid=$1 [R,NC,L]
RewriteRule ^news-([0-9]+)-([0-9]+).html$ news.php?acid=$1&cid=$2
RewriteRule ^(.+).html $1.php
=====================================================
例如:http://www.longyuan168.cn/newsshow.php?id=196&cid=44
↑这个链接用:http://www.longyuan168.cn/newsshow-196-44.html也可以打开。
但是没卵用啊。。。为什么主页上的链接点进去还是原来的URL。。
求问如何让访问/newsshow.php?id=196&cid=44 时变成newsshow-196-44.html或者newsshow/196/44.html或newsshow-196/44.html
是不是因为没有写RewriteCond判断?
本人小白。。上面写好的规则都是硬抄下来一个一个改完测试的。。希望各位大神回答的时候写清楚些。。跪谢T_T
页面上的显示的链接格式需要在PW系统里设置哦。。。