phpcms的httpd.ini伪静态规则怎么写 30
phpcms的httpd.ini伪静态规则怎么写?我的网站一级栏目:localhost/yule/二级栏目:localhost/yule/mingxing/内容页:loc...
phpcms的httpd.ini伪静态规则怎么写?
我的网站一级栏目: localhost/yule/
二级栏目: localhost/yule/mingxing/
内容页: localhost/yule/1.html
要怎么写httpd.ini伪静态规则呢?还有要设置404页面吗?
请各位大神帮帮忙!谢谢!
是windows 2003系统iis6.0 展开
我的网站一级栏目: localhost/yule/
二级栏目: localhost/yule/mingxing/
内容页: localhost/yule/1.html
要怎么写httpd.ini伪静态规则呢?还有要设置404页面吗?
请各位大神帮帮忙!谢谢!
是windows 2003系统iis6.0 展开
展开全部
您好,这样:
location / {
if (!-e $request_filename) {
rewrite ^/(.+.(html|xml|json|htm|php|jsp|asp|shtml))$ /index.php?$1 last;
}
}
Discuz 7伪静态化rewrite规则
rewrite ^/archiver/((fid|tid)-[w-]+.html)$ /archiver/index.php?$1 last;
rewrite ^/forum-([0-9]+)-([0-9]+).html$ /forumdisplay.php?fid=$1&page=$2 last;
rewrite ^/thread-([0-9]+)-([0-9]+)-([0-9]+).html$ /viewthread.php?tid=$1&extra=page=$3&page=$2 last;
rewrite ^/space-(username|uid)-(.+).html$ /space.php?$1=$2 last;
rewrite ^/tag-(.+).html$ /tag.php?name=$1 last;
discuzX2.0伪静态化rewrite规则
# 将 RewriteEngine 模式打开
RewriteEngine On
# 修改以下语句中的 /discuz 为你的论坛目录地址,如果程序放在根目录中,请将
/discuz 修改为 /
RewriteBase /
# Rewrite 系统规则请勿修改
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^topic-(.+).html$ portal.php?mod=topic&topic=$1&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^article-([0-9]+)-([0-9]+).html$ portal.php?mod=view&aid=$1&page=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^forum-(w+)-([0-9]+).html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+).html$ forum.php?mod=viewthread&tid=$1&extra=page=$3&page=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^group-([0-9]+)-([0-9]+).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-([0-9]+)-([0-9]+).html$ home.php?mod=space&uid=$1&do=blog&id=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$RewriteRule ^archiver/(fid|tid)-([0-9]+).html$ archiver/index.php?action=$1&value=$2&%1
location / {
if (!-e $request_filename) {
rewrite ^/(.+.(html|xml|json|htm|php|jsp|asp|shtml))$ /index.php?$1 last;
}
}
Discuz 7伪静态化rewrite规则
rewrite ^/archiver/((fid|tid)-[w-]+.html)$ /archiver/index.php?$1 last;
rewrite ^/forum-([0-9]+)-([0-9]+).html$ /forumdisplay.php?fid=$1&page=$2 last;
rewrite ^/thread-([0-9]+)-([0-9]+)-([0-9]+).html$ /viewthread.php?tid=$1&extra=page=$3&page=$2 last;
rewrite ^/space-(username|uid)-(.+).html$ /space.php?$1=$2 last;
rewrite ^/tag-(.+).html$ /tag.php?name=$1 last;
discuzX2.0伪静态化rewrite规则
# 将 RewriteEngine 模式打开
RewriteEngine On
# 修改以下语句中的 /discuz 为你的论坛目录地址,如果程序放在根目录中,请将
/discuz 修改为 /
RewriteBase /
# Rewrite 系统规则请勿修改
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^topic-(.+).html$ portal.php?mod=topic&topic=$1&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^article-([0-9]+)-([0-9]+).html$ portal.php?mod=view&aid=$1&page=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^forum-(w+)-([0-9]+).html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+).html$ forum.php?mod=viewthread&tid=$1&extra=page=$3&page=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^group-([0-9]+)-([0-9]+).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-([0-9]+)-([0-9]+).html$ home.php?mod=space&uid=$1&do=blog&id=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$RewriteRule ^archiver/(fid|tid)-([0-9]+).html$ archiver/index.php?action=$1&value=$2&%1
追问
这不是我想要的,我的网站一级栏目: localhost/yule/
二级栏目: localhost/yule/mingxing/
内容页: localhost/yule/1.html
要怎么写httpd.ini伪静态规则呢?
你会吗?
佳达源
2024-10-28 广告
2024-10-28 广告
AR0144CSSM20SUKA0-CPBR这款产品,作为我司产品线中的重要一员,集成了高精度的传感器技术与先进的图像处理算法,广泛应用于安防监控、工业自动化及机器视觉等领域。其卓越的性能与稳定性,确保了在各种复杂环境下的精准数据采集与高效...
点击进入详情页
本回答由佳达源提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询