Joomla 301重定向问题

Joomla 301重定向问题

问题描述:

I'm working on a Joomla 3.2.0 site for a client and for some reason the 301 Redirects in the .htaccess aren't working. I've tried a number of different solutions that I've found on here and elsewhere.

I need to redirect the old URLs to fit the setup of the new site, additionally so that links from search engines work correctly and customers that try to use old URLs can still get where they're trying to go.

I'm trying to redirect http://www.mysite.com/client-login/ to http://www.mysite.com/index.php/2013-12-30-04-44-07/dhs-login

I've tried the following:

# Permanent URL redirect
Redirect 301 /client-login/ http://www.mysite.com/index.php/2013-12-30-04-44-07/dhs-login

and

RewriteRule ^/client-login/$ "http://www.mysite.index.php" [R=301,L]

I've also tried the redirect system built into Joomla with no luck...

I would appreciate some help if anyone has an idea how to fix this

Thanks!

我正在为一个客户端工作Joomla 3.2.0网站,并且出于某种原因,在301中重定向。 htaccess无法正常工作。 我尝试了许多不同的解决方案,我在这里和其他地方找到了。 p>

我需要重定向旧网址以适应新网站的设置,另外,以便搜索引擎的链接正常工作,尝试使用旧网址的客户仍可以获得他们的位置 试着去。 p>

我正在尝试重定向 http://www.mysite .com / client-login / http://www.mysite.com/index.php/2013-12-30-04-44-07/dhs-login p>

我已经 尝试了以下内容: p>

 #Permanent URL redirect 
Redirect 301 / client-login / http://www.mysite.com/index.php/2013-12-30-  04-44-07 / dhs-login 
  code>  pre> 
 
 

和 p>

  RewriteRule ^ / client-login / $“  http://www.mysite.index.php“[R = 301,L] 
  code>  pre> 
 
 

我也尝试过内置Joomla的重定向系统没有运气 ... p>

如果有人知道如何解决此问题,我将不胜感激 p>

谢谢! p> div >

I think you're not writing correctly your RewriteRule, try without qoutation marks and write your base:

RewriteEngine on

RewriteBase /

RewriteRule ^client-login/$ /2013-12-30-04-44-07/dhs-login [R=301,L]

Check regular expresions, you may use http://regexpal.com for that.

Anyway, if you have to redirect ALL your web traffic, deppending of your web structure maybe is better if you guide all the traffic to a specific PHP controller which redirect with 301 header the traffic according to several rules you specify. In occasions is easier than rewrite directly in the .htaccess