首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 服务器 > Apache >

不懂的.htaccess 初学者求帮助

2012-03-20 
不懂的.htaccess 菜鸟求帮助代码如下IfModulemod_rewrite.cRewriteEngineOnRewriteBase/RewriteRule^art

不懂的.htaccess 菜鸟求帮助
代码如下
<IfModule   mod_rewrite.c>
RewriteEngine   On
RewriteBase   /
RewriteRule   ^article/([0-9]+).html$   article.php?act=detail&id=$1   [L]
RewriteRule   ^article/([0-9]+).html$   article.php?act=cate&cid=$1   [L]
</IfModule>

我对这个不懂,求帮忙....哪位能写个正确...感激不尽...

[解决办法]
这样试试,效果为article/ab-12.html
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule article\/([a-zA-Z]{1,})-([0-9]{1,}).html$ article.php?act=$1&id=$2
RewriteRule article\/([a-zA-Z]{1,})-([0-9]{1,}).html$ article.php?act=$1&cid=$2
</IfModule>

热点排行