开发者

301 Redirects - Advanced?

I am in a situation where there are TWO version sof each page on my site - which runs into thousands....now this is causing all sorts of problems with Google, I am dropping down the search results due to duplicate content. This was created as a result of enabling "SEO Friendly URLs" on my site.

Is there a way that I can rewrite ALL pages taht start with say brands.php to their SEO friendly version? e.g. /products.php?pro开发者_如何学Goduct=Oil-Pump-Star to /prducts/oil-pump-star/....without having to go through each URL manually...

Apologies if this is confusing - I find it hard to put the exact situation into written words!

Any input is appreciated!


this looks like you are using a Joomla CMS. you could use rel="canonical" to get away with this, but this will have to be done manually unfortunately. Google still suggests using a 301 redirect, and recommends a rel="canonical" only where 301 is not possible.

I will let you decide whats best for you.


It's hard to give you an example without knowing the type of URLs your system is setup for. However, based on the example you gave, you could do something like this:

RewriteRule ^([0-9a-zA-Z-]+).php?([0-9a-zA-Z]+)=([0-9a-zA-Z_-]+)$                   $1/$3 [NC]

I have not tested it, so it may need some tweaking. You'll need to adjust your rules accordingly to work with the URLs you are trying to restructure.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜