htaccess的的mod_rewrite的Opencart搜索页面的网址页面、网址、htaccess、mod_rewrite

由网友(一生嚣张不服输)分享简介:我有一些困难,创造一个htaccess的mod_rewrite规则,将采取以下网址:I'm having some difficulty creating an htaccess mod_rewrite rule which would take the following URL:的http://www.mydo...

我有一些困难,创造一个htaccess的mod_rewrite规则,将采取以下网址:

I'm having some difficulty creating an htaccess mod_rewrite rule which would take the following URL:

的http://www.mydomain.com/index.php?route=product/search&filter_name=SEARCH%20CRITERIA

,并使其沿行更多的东西:

and make it something more along the lines of:

http://www.mydomain.com/search/SEARCH-CRITERIA

甚至

http://www.mydomain.com/search?filter_name=SEARCH%20CRITERIA

一切我已经试过似乎打破了由Opencart框架自动生成的搜索引擎友好的URL。如何才能做到这一点?

Everything I've tried seems to break the SEO-friendly URLs that are auto-generated by the Opencart framework. How can this be done?

推荐答案

在你的的.htaccess 文件位置的规则直接用来改写的sitemap.xml和的GoogleBase敌后.XML最后一般规则之前。

In Your .htaccess file place the rules directly behind the lines used to rewrite sitemap.xml and googlebase.xml and before the last general rule.

该规则可能是这样的:

RewriteRule ^search/(.*)$ index.php?route=product/search&filter_name=$1

- 。没有测试,这只是一个猜测

- did not test it, it is just a guess.

也向我们展示你尝试过什么将是非常美联社preciated。

Also showing us what have You tried would be highly appreciated.

阅读全文

相关推荐

最新文章