Xxx.com/front <<工作报告
Array ( [mod] => home )Xxx.com/ << -my-seo-title新闻返回
Array ( [mod] => cat [act] => more [seo] => hiburan-2 )xxx.com/cat-mycategory-1 <<不工作返回
Array ( [mod] => cat [act] => more [seo] => hiburan-2 ) 我需要像这样的返回。
Array ( [mod] => cat [act] => more [seo] => hiburan [page]=> 2 )我犯了什么错误,因为这是我第一次做首页的工作,所以我需要好的干净的网址
顺便说一下,这是我的.htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^front root.php?mod=home [L]
RewriteRule ^/?(news|sch|cat)-([^-].*)$ root.php?mod=$1&act=more&seo=$2 [L]
RewriteRule ^/?(news|sch|cat)-([^-].*)-([0-9]+)$ root.php?mod=$1&act=more&seo=$2&page=$3 [L]
Options All -Indexes
</IfModule>希望有人能帮助我,非常感谢,如果有链接或任何我可以阅读的东西,请给我链接。附加信息我的搜索引擎优化标题格式像这样(破折号分开)
this-is-seo-title谢谢你之前
发布于 2014-12-08 16:15:38
您可以使用此.htaccess
Options All -Indexes
RewriteEngine on
RewriteRule ^front root.php?mod=home [L]
RewriteRule ^/?(news|sch|cat)-(.+)-(\d+)/?$ root.php?mod=$1&act=more&seo=$2&page=$3 [L]
RewriteRule ^/?(news|sch|cat)-(.+)/?$ root.php?mod=$1&act=more&seo=$2 [L]不可能使用[^-]*,因为您在seo标题中使用了-。
https://stackoverflow.com/questions/27353194
复制相似问题