100分求apache+tomcat的SEO问题
时间:2010-10-18
来源:互联网
apache2.0,tomcat5
在httpd.conf中配置
RewriteRule ^/brand/columnCode_page_(\d+) /app?m=about&columnCode=exh_list¤tPage=$1&pageSize=10 [PT]
currentPage是页数,pageSize是每页显示的行数
然后访问 http://localhost/brand/columnCode_page_1,后台可以正常跳转到 action,浏览器地址栏显示的也是 http://localhost/brand/columnCode_page_1
但是问题来了,当点击“下一页”时,页面地址栏就会变成 http://localhost/app?m=about&columnCode=exh_list¤tPage=2&pageSize=10
下一页是以form表单形式递交
尝试添加配置 RewriteRule ^/app?m=about&columnCode=exh_list¤tPage=(\d+)&pageSize=10 /brand/columnCode_page_$1 [R=301],但是无效。
请问各位大虾,该如何配置才能让action跳转回静态页面的形式?
在httpd.conf中配置
RewriteRule ^/brand/columnCode_page_(\d+) /app?m=about&columnCode=exh_list¤tPage=$1&pageSize=10 [PT]
currentPage是页数,pageSize是每页显示的行数
然后访问 http://localhost/brand/columnCode_page_1,后台可以正常跳转到 action,浏览器地址栏显示的也是 http://localhost/brand/columnCode_page_1
但是问题来了,当点击“下一页”时,页面地址栏就会变成 http://localhost/app?m=about&columnCode=exh_list¤tPage=2&pageSize=10
下一页是以form表单形式递交
尝试添加配置 RewriteRule ^/app?m=about&columnCode=exh_list¤tPage=(\d+)&pageSize=10 /brand/columnCode_page_$1 [R=301],但是无效。
请问各位大虾,该如何配置才能让action跳转回静态页面的形式?
作者: atremis 发布时间: 2010-10-18
代码是简写形式的URL
href="?m=about&columnCode=exh_list¤tPage=2&pageSize=10"
href="?m=about&columnCode=exh_list¤tPage=2&pageSize=10"
作者: icy_csdn 发布时间: 2010-10-18
不好意思,回复错了。
作者: icy_csdn 发布时间: 2010-10-18
有两个办法
1. 改写你的分页程序,使分页的形式显示为/brand/columenCode_page_这种形式
2. 通过rewriter, 注意你的规则写错了
RewriteCond %{QUERY_STRING} ^m=about&columnCode=exh_list¤tPage=(\d+)&pageSize=10
RewriteRule ^/app$ /brand/columnCode_page_%1 [R=301]
1. 改写你的分页程序,使分页的形式显示为/brand/columenCode_page_这种形式
2. 通过rewriter, 注意你的规则写错了
RewriteCond %{QUERY_STRING} ^m=about&columnCode=exh_list¤tPage=(\d+)&pageSize=10
RewriteRule ^/app$ /brand/columnCode_page_%1 [R=301]
作者: icy_csdn 发布时间: 2010-10-18
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28