简体   繁体   English

301重定向:将Joomla 1.5转换为Wordpress

[英]301 Redirecting: Joomla 1.5 to Wordpress

I need to 301 redirect around 6000 URLs. 我需要在6000个网址附近进行301重定向。 I have already prepared and tested all the URLsand its working fine. 我已经准备并测试了所有URL,并且可以正常工作。 But I'm facing only one problem. 但是我只面临一个问题。

Old URL to new URL redirection is working fine, for example: 旧的URL到新的URL重定向工作正常,例如:

Redirect 301 /career/old-url.html /career/new-url/1/
Redirect 301 /career/old-url2.html /career/new-url/2/

But when I add redirect category page URL to new category page URL, for example: 但是,当我将重定向类别页面URL添加到新类别页面URL时,例如:

Redirect 301 /career /category/career/
Redirect 301 /career/old-url.html /career/new-url/1/
Redirect 301 /career/old-url2.html /career/new-url/2/

Then it breaks all URLs by adding "Category" word to the URLs, for example: 然后,通过在URL中添加“类别”一词来破坏所有URL,例如:

Redirect 301 /career/old-url.html /career/new-url/1/ 

Redirects to: 重定向到:

Redirect 301 /career/old-url.html /category/career/new-url/1/

Thus breaking all the URLs: If I won't redirect that 47 Joomla category page URLs to New WordPress Category URLs then rest of 6000 URLs redirection works just fine. 从而破坏所有URL:如果我不将47个Joomla类别页面URL重定向到New WordPress类别URL,那么其余6000个URL重定向就可以了。

I have 6000 articles URLs and 47 categories. 我有6000条文章网址和47个类别。 So if I won't redirect 47 categories then it will create 47, 404 pages. 因此,如果我不重定向47个类别,则它将创建47个404页面。 So I have only one question. 所以我只有一个问题。 What is the perfect code to redirect all the URLs along with the categories? 重定向所有URL和类别的完美代码是什么?

.htaccess processes redirects in order, so you need to have the most specific redirect at the top and the most general at the bottom. .htaccess进程按顺序进行重定向,因此您需要在顶部具有最具体的重定向,在底部具有最一般的重定向。 Try this instead: 尝试以下方法:

Redirect 301 /career/old-url.html /career/new-url/1/
Redirect 301 /career/old-url2.html /career/new-url/2/
Redirect 301 /career /category/career/

You can try the following plugin: 您可以尝试以下插件:

https://wordpress.org/plugins/remove-category-url/ https://wordpress.org/plugins/remove-category-url/

It simply removes /category/ from url. 它只是从URL中删除/ category /。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM