Home > php教程 > php手册 > body text

Discuz配置搜索引擎优化(URL重写) apache配置

WBOY
Release: 2016-06-06 20:01:02
Original
1344 people have browsed it

完全启用 勾选 URL静态化 全选 Rewrite 兼容性 勾选 在apache配置文件中设置 IfModule mod_rewrite.c RewriteEngine On RewriteRule ^(.*)/archiver/((fid|tid)-[/w/-]+/.html)$ $1/archiver/index.php?$2 RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)/.html$

 

完全启用 勾选

URL静态化 全选

Rewrite 兼容性 勾选

Discuz配置搜索引擎优化(URL重写) apache配置

在apache配置文件中设置


RewriteEngine On
RewriteRule ^(.*)/archiver/((fid|tid)-[/w/-]+/.html)$ $1/archiver/index.php?$2
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)/.html$ $1/forumdisplay.php?fid=$2&page=$3
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)/.html$ $1/viewthread.php?tid=$2&extra=page/%3D$4&page=$3
RewriteRule ^(.*)/space-(username|uid)-(.+)/.html$ $1/space.php?$2=$3

RewriteRule ^/home/(space|network)-(.+)/.html$ /home/$1/.php/?rewrite=$2
RewriteRule ^/home/(space|network)/.html$ /home/$1/.php
RewriteRule ^/home/([0-9]+)$ /home/space/.php/?uid=$1

RewriteRule ^(.*)/tag-(.+)/.html$ $1/tag.php?name=$2

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!