【发布时间】:2016-04-13 19:29:54
【问题描述】:
我仍在尝试将基于 Joomla 的网站迁移到 WordPress 安装。我偶然发现了一个不可预见的 url 重写。 Joomla 使用分页,例如article?start=3。 WordPress 使用article/3/。
很遗憾,我尝试将“?start=3”重写为“/3”/ 失败了。任何人都可以弄清楚语法吗??? = 似乎打破了它。
编辑:我将添加当前流程的示例。
1) 传入网址
http://www.domain.com/nl/tips/160-ziggo-storing-oplossen-dns-server-aanpassen?start=2
2) 移动到子域
http://nl.domain.com/tips/160-ziggo-storing-oplossen-dns-server-aanpassen?start=2
3) 新标题
http://nl.domain.com/tips/ziggo-storing-oplossen-dns-server-aanpassen?start=2
所需的网址
http://nl.domain.com/tips/160-ziggo-storing-oplossen-dns-server-aanpassen/2/
最后一步是我卡住的那一步。
www 上的当前 htaccess:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^nl\.domain\.com$ [NC]
RewriteRule ^(nl)/(.*)$ http://$1.domain.com/$2 [L,R=301]
nl 上的当前 htaccess:
RewriteEngine On
RewriteBase /
redirect 301 /uitleg/processor/91-de-processor-zoveel-cores-heeft-u-daar-iets-aan /inside/processor-uitleg/de-processor-een-processor-is-meer-dan-een-processor/
(493 lines of redirects)
【问题讨论】:
-
你能把htaccess贴在这里吗....比我可以检查一下...
-
所以你基本上是在规则本身中检查
?start=3。你没有使用QUERY_STRING条件。 -
我在问题中添加了更多信息和当前的 htaccess。在发布此问题之前,我根据我的有限知识搜索“start=3”所做的实验已经被删除,因为我尝试的所有版本都生成了错误 500。
标签: wordpress .htaccess mod-rewrite joomla