× Here you can get community support related to ReDJ.

Problems with 301 redirect

  • Artform
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 3 weeks ago #871 by Artform
Problems with 301 redirect was created by Artform
Hello,

I've switched from my old html website to a new 2.5 joomla website and hoped to use ReDJ for all the permanent redirects.
So far I've tried different forms for the From URL like absolute urls:
www.garnihotelfriedheim.com/menu/Freizeit.htm

or relative urls like:

/menu/Wandern.htm


and for the To URL absolute urls like:

www.garnihotelfriedheim.com/index.php/de/pension-de/sport-freizeit-de

or relative urls like:

/index.php/de/pension-de/wandern-kultur-de


I always get a 404 error and after several attempts I didnt have any success.
Also I cant seem to get the 404 error page to work even when I put CUSTOM PAGE to YES and select a Page in the Plugin. I also added ErrorDocument 404 / to the end of my .htaccess.

My main problem right now is the 301 redirect, since the page was indexed really well on google and i dont want to loose that position after the migration.

Thanks and sincere greetings

Simon

Please Log in or Create an account to join the conversation.

More
11 years 3 weeks ago #872 by admin
Replied by admin on topic Problems with 301 redirect
Hi Simon,
when I call:

www.garnihotelfriedheim.com/menu/Freizeit.htm

I get the blank error page from apache. So, first step is to enable .htaccess file, and add this line at the end:
ErrorDocument 404 /

After this, you can create your first ReDJ redirection rule:
From URL: ^/menu/Freizeit.htm$
To URL: http://{siteurl}/index.php/de/pension-de/sport-freizeit-de
Request only: true (check)

Just enable ReDJ plugin and it should work.

Kind regards,
Luigi

Please Log in or Create an account to join the conversation.

  • Artform
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 3 weeks ago #873 by Artform
Replied by Artform on topic Problems with 301 redirect
Thank you, i hadn't figured out that .htaccess was not active yet and now the redirect works great. the 404 doesnt work yet even thou i've added the ErrorDocument 404 /. But its no problem since the site is quite small and ive redirected every old link.

Actually i've used relative links for FROM and TO URLS and it worked fine like this:

/menu/Wandern.htm

to

/de/pension-de/wandern-kultur-de

Thanks again and best wishes

Simon

Please Log in or Create an account to join the conversation.

More
11 years 3 weeks ago #874 by Ramadan83
Replied by Ramadan83 on topic Problems with 301 redirect
Hi Simon, this is right:

/menu/Wandern.htm

But this is better:

^/menu/Wandern\.htm$

Cause the second one matches only one URL that start with (^) /menu and end with ($) htm.

Remember that "From URL" is a regular expression, so you can use special chars to match many URLs with a single rule.

Kind regards,
Luigi

Please Log in or Create an account to join the conversation.

  • Artform
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 3 weeks ago #875 by Artform
Replied by Artform on topic Problems with 301 redirect
Thanks for the help! Sincerly

Simon

Please Log in or Create an account to join the conversation.

More
11 years 3 weeks ago #876 by admin
Replied by admin on topic Problems with 301 redirect
U're welcome.

Please Log in or Create an account to join the conversation.

Time to create page: 0.134 seconds