apache伪静态设置
RewriteEngine On#游戏列表详细介绍
RewriteRule ^g-(+).html$ game.php?action=gamelist_desc&game_id=$1
#游戏开服表
RewriteRule ^serverlist-(+).html$ website.php?action=server_list&game_id=$1
#游戏官网伪静态
RewriteRule ^w-(+).html$ website.php?website=$1
RewriteRule ^w-(+)-news.html$ website.php?action=news&website=$1
RewriteRule ^w-(+)-xinwen.html$ website.php?action=news&website=$1&category_id=7
RewriteRule ^w-(+)-huodong.html$ website.php?action=news&website=$1&category_id=8
RewriteRule ^w-(+)-meiti.html$ website.php?action=news&website=$1&category_id=9
RewriteRule ^w-(+)-gonglue.html$ website.php?action=news&website=$1&category_id=10
RewriteRule ^w-(+)-news-page-(+).html$ website.php?action=news&website=$1&page=$2
RewriteRule ^w-(+)-news-(+).html$ website.php?action=art&website=$1&content_id=$2
RewriteRule ^w-(+)-ziliao.html$ website.php?action=ziliao&website=$1
RewriteRule ^w-(+)-ziliao-page-(+).html$ website.php?action=ziliao&website=$1&page=$2
RewriteRule ^w-(+)-ziliao-(+).html$ website.php?action=art&website=$1&content_id=$2
#新闻伪静态
RewriteRule ^news-(+).html$ news.php?id=$1
RewriteRule ^news-(+)-p(+).html$ news.php?id=$1&page=$2
RewriteRule ^content-(+).html$ content.php?id=$1
RewriteRule ^content-(+)-(+).html$ content.php?id=$1&page=$2
RewriteRule ^c/(+).html$ game.php?action=guildstart&myworld=$1
RewriteRule ^index.html$ index.php
RewriteRule ^game.html$ game.php
RewriteRule ^kaif.html$ kaif.php
RewriteRule ^user.html$ user.php
RewriteRule ^pay.html$ pay.php
RewriteRule ^card.html$ card.php
RewriteRule ^reg.html$ reg.php
RewriteRule ^about.html$ about.php?a=1
RewriteRule ^login.html$ login.php
#404页面
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .? /404.php
#不允许直接访问 下面目录下的php文件
RewriteCond % !^$
RewriteRule api/(.*).(php)$ –
RewriteRule config/(.*).(php)$ –
RewriteRule ebak/(.*).(php)$ –
RewriteRule hi_ports/(.*).(php)$ –
RewriteRule includes/(.*).(php)$ –
RewriteRule pay/(.*).(php)$ –
RewriteRule templates/(.*).(php)$ –
RewriteRule uploads/(.*).(php)$ –
#不允许访问 .inc .txt .sql .conf扩展名的文件
<Files ~ "\.(inc|txt|sql|conf)$">
Order allow,deny
Deny from all
</Files>
#discuz 3.3伪静态规则
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/article-(+)-(+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/forum-(\w+)-(+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/thread-(+)-(+)-(+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/group-(+)-(+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/blog-(+)-(+)\.html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/(fid|tid)-(+)\.html$ $1/archiver/index.php?action=$2&value=$3&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/(+*)-(+)\.html$ $1/plugin.php?id=$2:$3&%1
页:
[1]