× Here you can get community support related to ReDJ.

Url Path redirect, some 301 redirects not working

More
9 years 9 months ago - 9 years 9 months ago #2706 by Manos
Hi Admin, first of all thanks for your great free extensions.

I am using redj to redirect many urls, my site is quite big. The domain is www.Techvalue.net

Well, almost a month ago i changed all the urls paths to be more sef and for humans easy to read and undrestead. Problem is that some of the old links (expired links) can not be redirected and they link to the main site.

For example this is an old url:
www.techvalue.net/index.php/el/tech4all/17-zte-v889s-hands-on-video

And this is the new one:
www.techvalue.net/parousiaseis/17-zte-v889s-hands-on-video

for some reason redirects from www.techvalue.net/index.php/el/tech4all/ dont work and all articles with old links they are redirecting to main page www.techvalue.net.

What i need to do is redirect all articles with one rule or command.

www.techvalue.net/index.php/el/tech4all/
to
www.techvalue.net/parousiaseis/

How can i achieve something like that?
Can you please also help try this with a command in .htaccess?

Thanks for your time :)
Last edit: 9 years 9 months ago by Manos.

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

More
9 years 9 months ago #2708 by Manos
I think now it's fixed using this rule


RewriteRule ^index.php/tech4all/(.*)$ /parousiaseis/$1 [R=301,L]

:P

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

More
9 years 9 months ago - 9 years 9 months ago #2711 by admin
Hi,
the .htaccess rule is perfect but what about "el"? :P

Just for information, the same ReDJ rule is:
From URL: ^/index\.php/el/tech4all/
To URL:http://{siteurl}/parousiaseis/{pathltrim /index.php/el/tech4all/}
Request only: true (checked)

Kind regards,
Luigi
Last edit: 9 years 9 months ago by admin.
The following user(s) said Thank You: Manos

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

More
9 years 9 months ago #2714 by Manos
Thanks for the reply, yeah thats why i added both redirects just in case. I use Redj only for signle url redirect think is better to add to .htaccess path redirect.
RewriteRule ^index.php/tech4all/(.*)$ /parousiaseis/$1 [R=301,L]
RewriteRule ^index.php/el/tech4all/(.*)$ /parousiaseis/$1 [R=301,L]
But is there a way to apply these 2 url path redirects with only 1 command? Maybe i need command to detect /tech4all/ anywhere in the url path and redirect it to /parousiaseis/


Also unicode characters in .htaccess is a pain. :S Had to replace all % with \x. is there any command to do this for me?
RewriteRule ^el/\xCE\xB1\xCF\x81\xCF\x87\xCE\xB9\xCE\xBA\xCE\xAE/16-\xCE\xBD\xCE\xAD\xCE\xB1/(.*)$ /nea/$1 [R=301,L]
RewriteRule ^\xCE\xB1\xCF\x81\xCF\x87\xCE\xB9\xCE\xBA\xCE\xAE/16-\xCE\xBD\xCE\xAD\xCE\xB1/(.*)$ /nea/$1 [R=301,L]

Many thanks again for the support you offer to this forum. you are generus

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

More
9 years 9 months ago - 9 years 9 months ago #2732 by admin
Thanks, but I like to help my users, I'm lucky, because all my users are really kind.. :)

Question one, try to replace this:
RewriteRule ^index.php/tech4all/(.*)$ /parousiaseis/$1 [R=301,L]
RewriteRule ^index.php/el/tech4all/(.*)$ /parousiaseis/$1 [R=301,L]

With this:
RewriteRule ^index.php/(el/){0,1}tech4all/(.*)$ /parousiaseis/$1 [R=301,L]

Question two, I do not know any trick for .htaccess, but on ReDJ there's a confortable "Decode URL" option for each rule :)

Kind regards,
Luigi
Last edit: 9 years 9 months ago by admin.

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

Time to create page: 0.099 seconds