投稿 评论 顶部

论坛可用的伪静态规则代码.htaccess文件

佚名 网络安全

论坛可用的伪静态规则代码.htaccess文件


# 将 RewriteEngine 模式打开RewriteEngine On# 修改以下语句中的 / 为你的论坛站目录地址RewriteBase /# Rewrite 系统规则请勿修改RewriteCond %{QUERY_STRING} ^(.*)$RewriteRule ^topic-(.+)\.html$ portal.php?mod=topic&topic=$1&%1RewriteCond %{QUERY_STRING} ^(.*)$RewriteRule ^article-([0-9]+)-([0-9]+)\.html$ portal.php?mod=view&aid=$1&page=$2&%1RewriteCond %{QUERY_STRING} ^(.*)$RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1RewriteCond %{QUERY_STRING} ^(.*)$RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ forum.php?mod=viewthread&tid=$1&extra=page\=$3&page=$2&%1RewriteCond %{QUERY_STRING} ^(.*)$RewriteRule ^group-([0-9]+)-([0-9]+)\.html$ forum.php?mod=group&fid=$1&page=$2&%1RewriteCond %{QUERY_STRING} ^(.*)$RewriteRule ^space-(username|uid)-(.+)\.html$ home.php?mod=space&$1=$2&%1RewriteCond %{QUERY_STRING} ^(.*)$RewriteRule ^([a-z]+)-(.+)\.html$ $1.php?rewrite=$2&%1# 下面是自定义的403、404、500的显示网页  请先将网页放到对应目录下ErrorDocument 403 /403.phpErrorDocument 404 /404.phpErrorDocument 500 /500.php