Use 301 Redirect In Google Blogger/Blogspot - .htaccess

I have a Google Blogger blog where I blog. Sometime ago, I posted a post but now after getting new data, I updated that post and I got new URL of that post. But I have a lot of backlinks to that old URL and now when they are htiing then they are getting 404 page that is a bad SEO. Now I want to use 301 Redirect to redirect old URL to new URL.
For this purpose, I know that we have to use .htaccess and add Redirect 301 OLD_POST_URL NEW_POST_URL but Google Blogger doesn't offer to edit .htaccess so How to do this there?

Yes, Google Blogger does not offer you to edit .htaccess file but they just released an option to use Custom 301 Redirects. From this featurs, you can do what you want. Just follow the below step to use this features.
Go To Your Desired "Blog" Dashboard.
Go To "Setting".
Go To "Search prefences".
Click "Edit" On Custom Redirects ? no items Edit
Now Add Your Desired Old Post URL In "From" Input Section And Your
URL Should Be Like /YEAR/MONTH/POST-TITLE.html
Now Add Your Desired New Post URL In "To" Input Section And Your URL
Should Be Like /YEAR/MONTH/POST-TITLE.html
Check "Permanent" Option.
Click "Save".
Then Click "Save Changes".
I added a screenshoot below to understand completely.

There is another solution for site based redirection using javascript. I've done this after changing my blogger subdomain and it works. Go to Settings -> Search Preferences and find the section Custom Page Not Found and click edit next to it. Enter a code similar to the following to redirect your old pages to your new web site:
<script>
var url = location.href;
var newurl = url.replace('oldblog.blogspot.com','newblog.blogspot.com');
location.href = newurl;
</script>
Change urls and save. You can use this method to redirect to other domains too. This is the custom 404 page of your old site so your old blog must return 404 for the urls you want to redirect.

When Server-side redirection is not supported, you can use canonical meta-tag in the <head> section of HTML:
<link rel="canonical" href="http://example.com/some-page-123" />
(Source)

Related

How can I redirect a page to external URL in Perch CMS

I have a Perch web site which will be moving (gradually) to a new domain, so I need to redirect some pages to the new URL.
e.g. mysite.com/page1 => mynewsite.com,
mysite.com/page2 stays the same
I have tried doing redirects using .htaccess, for example:
Redirect 302 /page1 https://mynewsite.com
This works fine if you type the URL in the browser address bar, but when I click on any link to page1 on the web site, all I get is a white screen and no redirection (I have cleared the browser cache). But then if I refresh the page, it redirects. What am I missing, is there a specific way to redirect Perch pages using .htaccess?
I can't see any way to add a link manually in the admin section (sorry I am not very familiar with Perch) - all I can see is 'Page to link to', with no option to enter an external link. How can you set the link to an external URL?
Thanks.

Redirect to a page using Friendly URL in liferay

I've been searching for quite a long time and i haven't found a solution yet.
I want to know how to redirect to a page using only friendly url from view.
I'm working with Liferay v6.2
EDIT :
For example I have a page with friendly url that i know in advance 'domain/users'.
From page A I want to have a link that redirects me to that url.

How to redirect from prestashop Home page to different URL

I can't figure out how can I redirect my home page to different URL. I have found tutorials how to redirect to product or category page but these doesn't work in my case.
For example:
When someone goes to myprestashop.com they will be redirected to myprestashop.com/differentpage
Sorry, if it is very simple, I'm new to prestashop and ecommerce.
You can use the following code to redirect page to another page
From frontend:
Tools::redirect(Context::getContext()->link->getPageLink('abc', true));
If you want to redirect only one page to a specific page, it's better (and also easier) to use .htaccess to do this.
How to Redirect one Page url to another

Is it possible to have a url redirect to another page and keep the original url in the title bar?

A marketer in my company has a landing page on our site: www.importantcompany.com/amazingproduct
They have a vanity url that goes to the landing page:
www.amazingproduct.com
I successfully created the iis redirect rule. However, the marketer has comeback and would like to keep the redirect rule, but keep the address in the bar www.amazingproduct.com instead of www.importantcompany.com/amazingproduct
I'm assuming that this is not possible.
The only way to make this work is to create a new site in iis and copy the landing page into the new site and set the new site to go to www.amazingproduct.com
Please let me know if my assumption is correct.
Thanks!
Your assumption is incorrect.
You could write a filter on IIS that looks at the requested URL and notes if "www.amazingproduct.com" is sent in to do a "Server.Transfer" of the request to the subfolder that would be one solution that wouldn't require a new site at all.
URL Rewrite could also be another way to configure a way around this to some degree.

how to use old URls as it is in new drupal site

I am migrating an asp site to drupal.the existing site node URL is as
story.asp?sectioncode=1&storycode=49667&c=1
to use the same urls in drupal site i add the URL in URL aliases.when i click on any article it it showing as
story.asp%3Fsectioncode%3D1%26storycode%3D49667%26c%3D1
in the browser.how to remove %3D,%26,%3F from the URL and when i copy and paste the old url in the browser it is not redirecting me to the actual page giving 404 not found page.could some one please help me how to manage my old URLs as it is in new site.
You're not supposed to type something like story.asp?sectioncode=1&storycode=49667&c=1 as an URL alias.
There's a better way to do that. Try installing redirect module and add a new 301 redirect rule from story.asp?sectioncode=1&storycode=49667&c=1 to your new node's URL node/1.
So, whatever any user / search engine visits story.asp?sectioncode=1&storycode=49667&c=1, they will be redirected to node/1. or whatever the path you have given to the 301 redirect rule.
Hope this Helps... Muhammad.

Resources