Problems with 301 redirect
-
Artform
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 3
-
Thank you received: 0
-
-
11 years 7 months ago #871
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.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
11 years 7 months ago #872
by admin
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:
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
-
Less
More
-
Posts: 3
-
Thank you received: 0
-
-
11 years 7 months ago #873
by Artform
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.
Less
More
-
Posts: 1
-
Thank you received: 0
-
-
11 years 7 months ago #874
by Ramadan83
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
-
Less
More
-
Posts: 3
-
Thank you received: 0
-
-
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
Time to create page: 0.106 seconds