【问题标题】:seo url rewritingseo url重写
【发布时间】:2012-07-17 02:28:07
【问题描述】:

我在htaccess文件中写了url重写

RewriteRule ^([^/]+)/subject/([^/]+)/$ subjectlist.php?dept_id=$1  

但我写的不是 htaccess 文件中的其他链接

RewriteRule ^subjects/$ subject.php,RewriteRule ^([^/]+)/([^/]+)/$  chapter.php?course=$2

请帮忙

【问题讨论】:

  • 忽略重写 SEO 的 url,它主要是垃圾。

标签: php .htaccess seo


【解决方案1】:

尝试逐行编写规则

RewriteRule ^subjects/$ subject.php
RewriteRule ^([^/]+)/([^/]+)/$  chapter.php?course=$2

【讨论】:

  • 我逐行写为 RewriteRule ^subjects/$ subject.php RewriteRule ^([^/]+)/([^/]+)/$ chapter.php?course=$2 RewriteRule ^([^/]+)/subject/([^/]+)/$ subjectlist.php?dept_id=$1 但最后一个网址无效。
猜你喜欢
  • 2013-04-18
  • 2011-11-27
  • 1970-01-01
  • 2011-06-17
  • 1970-01-01
  • 1970-01-01
  • 2014-11-11
  • 2016-01-21
  • 1970-01-01
相关资源
最近更新 更多