Dz2.5 .htaccess下载
<P># 将 RewriteEngine 模式打开
RewriteEngine On
# 修改以下语句中的 /discuz 为你的论坛目录地址,如果程序放在根目录中,请将 /discuz 修改为 /</P>
<P>RewriteBase /</P>
<P># Rewrite 系统规则请勿修改
RewriteCond %{QUERY_STRING} ^(.*)$$$$
RewriteRule ^topic-(.+)\.html$$$$ portal.php?mod=topic&topic=$$$$1&%1
RewriteCond %{QUERY_STRING} ^(.*)$$$$
RewriteRule ^article-(+)-(+)\.html$$$$ portal.php?mod=view&aid=$$$$1&page=$$$$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$$$$
RewriteRule ^forum-(\w+)-(+)\.html$$$$ forum.php?mod=forumdisplay&fid=$$$$1&page=$$$$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$$$$
RewriteRule ^thread-(+)-(+)-(+)\.html$$$$ forum.php?mod=viewthread&tid=$$$$1&extra=page\%3D$$$$3&page=$$$$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$$$$
RewriteRule ^group-(+)-(+)\.html$$$$ forum.php?mod=group&fid=$$$$1&page=$$$$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$$$$
RewriteRule ^space-(username|uid)-(.+)\.html$$$$ home.php?mod=space&$$$$1=$$$$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$$$$
RewriteRule ^blog-(+)-(+)\.html$$$$ home.php?mod=space&uid=$$$$1&do=blog&id=$$$$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$$$$
RewriteRule ^archiver/(fid|tid)-(+)\.html$$$$ archiver/index.php?action=$$$$1&value=$$$$2&%1</P>
<P>
ErrorDocument 404 /404.html
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.baidu.com$$$$
RewriteRule ^(.*)$$$$ <A href="http://www.baidu.com/$$$$1">http://www.baidu.com/$$$$1</A>
</P>代码解释:
RewriteBase /bbs (如果你的网站放在网站根目录的/bbs下,上面的代码就一定要修改)
ErrorDocument 404 /404.html (404页面丢失提示页面 下载404模版)
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.baidu.com$ (做301跳转代码)
RewriteRule ^(.*)$ http://www.baidu.com/$1 (做301跳转代码)
页:
[1]