Jump to content

How to redirect a url to another so customers never see the redirected url, only the final url?


Recommended Posts

Hi, I am having an issue with smartblog module since it creates two url´s with the exact content and not only is not good for google, but it interrupts the module add this button from counting the post shares.

How can I do so that one url gets completely redirected to another so that the customers never see it?

 

Thanks.

Link to comment
Share on other sites

The first url must be relative, you can get rid of the first part until .com/

Sorry Nemo I dont quite understand. So what should I have typed instead? Maybe like this?:

 

post-794866-0-46757100-1466762415_thumb.png

 

Also, did I place the code in the right part of the .htaccess file?

Thanks for your support!!

Edited by HHServices (see edit history)
Link to comment
Share on other sites

Great, it works great:

Redirect 301 /en/module/smartblog/category https://www.highesthelp.com/en/psychicblog.html
Redirect 301 /es/module/smartblog/category https://www.highesthelp.com/es/psychicblog.html
 
I think that I will have to do the same with every post that I place in this blog, because  /en/module/smartblog/category redirects to https://www.highesthelp.com/en/psychicblog.html   but    /en/module/smartblog/category/newpost does not redirect to https://www.highesthelp.com/en/psychicblog/newpost.html
 
Is there any way to create a rule that covers all new posts?
 
Thank you.
Link to comment
Share on other sites

You do not have to use that pattern on the end url, just on the first part
you can try with  ^/es/module/smartblog/(a-zA-Z0-9\-)+$ as well
It depends on how the original url is anyway, like if it has .html or not

Link to comment
Share on other sites

Sorry Nemo, I think that i didnt explain myself well. These redirections are for the smartblog module because every time that I create a post with it, it creates automatically two url´s with the same content. One with a prettier url than the other, so I was trying to find out if I could create a rule so that everytime that I create a post it automatically redirects one of the newly created url´s to the other one (the prettiest).

 

ex:

I created a post and it made these url´s:

https://www.highesthelp.com/en/psychicblog/10_metaphysical-religion.html

https://www.highesthelp.com/en/module/smartblog/details?id_post=10

 

I want to create many posts, so redirecting manually each post on every language after I create it will en up tiring.

Do you think that I could create a rule for future posts? (each post with a different final url...)

 

Thank you Nemo!!

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...