Setting up redirects from non wordpress
-
Hi, we are rebuilding our site which was built on WordPress.
The old permalink structure was /%post_id%/
%postname%/
The new site is a custom build (not Wordpress), however, we are using WordPress for blog posts. The URL structure is www.customewebsite/blog/
As the custom site is not WordPress, we do not know how to create a redirect to push the WordPress url /%post_id%/ to the /blog section of the new site. What we currently get is page not found.
Can anyone help with the htaccess redirect code?
Many thanks one and all.
-
Hi Mcncil,
Wordpress is installed in a folder /blog
regards T
-
Are you installing WordPress on the subfolder of '/blog'? Or hoping to feed the posts from WordPress > the /blog page?
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Country Redirect Javascript
We are building a new site on .com and wish to redirect traffic from US to a dedicated US-specific version of the homepage , whereas international traffic will go to the standard homepage. We acknowledge the problems of IP redirection and googlebot crawling from US. So instead we are considering a Javascript pop-up if we recognise a US visitor (based on IP) which asks the user if they wish to view the US version or International version. We will store cookie of preferred selection for future visits. Within the site we will have a US/International selector. Can Moz community members confirm this is the best approach? Thanks
Intermediate & Advanced SEO | | bjalc20110 -
To redirect or not to redirect, that is the question
I work for a software company that is redeveloping the website (same domain.) We have tons of content in the form of articles and documents for support, how to use the product better, case studies, and blog posts. I've downloaded a landing page report and many of these have low impressions and little or no clicks (some ranked high other very low.) Should I redirect all this content to the new site where some of it won't exist or forget about it because of the lack of juice? Is there a rule-of-thumb threshold for redirecting for content?
Intermediate & Advanced SEO | | Nobody15969167212220 -
Clarification around 301 redirects.
I’ve come across numerous blogs recently that suggest that SEOs should NOT do bulk re-directs to a category page. This has come as something of a surprise (doh!!) and I feel like I should already know this. It does seem like there is lots disagreement here so I thought that I’d ask what people’s opinions were to make sure that I get my thinking straight. I've read all the main Moz blog posts on this topic and, although really useful, they've left me none the wiser around a few specific questions. Here’s some more detail about the situation. We’re currently consolidating a lot of content into a main blog, which will be the focal point of new blogs posts that are created. This is different to the past, where we tended to create separate blogs for different products on separate domains. I’m currently considering how we move content across from one the older blogs to this new blog (which will soon sit on a subfolder of our main domain). I have three (!) questions: 1) Could you confirm that doing bulk re-directs a category page is bad? I already know that doing them all to the homepage is an error. 2) Should I re-direct the home page of the old blog on a separate domain to the relevant category page on the new site? The category page is related, but does not cover the EXACT topic. The category page covers our replacement product offering. It I shouldn't do this, where should I re-direct the old blog domain to? 3) I’ve recommended that we set up 301 redirects on a one-to-one basis, redirecting each piece of content to its new location on the old site. What about content that has been earmarked for removal and for which there is no obvious alternative? My previous recommendation has been to re-direct these pages to the most relevant category page on the new blog. Would it be better to let this 404 or, as an alternative, create a custom 404 for the users on the new blog highlighting the new content that we offer? Any help would be appreciated 🙂
Intermediate & Advanced SEO | | RG_SEO0 -
When should you redirect a domain completely?
We moved a website over to a new domain name. We used 301 redirects to redirect all the pages individually (around 150 redirects). So my question is, when should we just kill the old site completely and just redirect (forward/point) the old domain over to the new one?
Intermediate & Advanced SEO | | co.mc0 -
Circular Canonical/Redirect
My client's site has an issue (see below) and I'm wondering how much it could be affecting crawlability. Has anyone seen a major rankings bump after fixing something like this? 1. In each page the rel=canonical is pointing to the http version of the page while the http version is redirecting to the https version. Basically, a circular redirect-canonical loop is occurring.2. The sitemap.xml is also referring to the http version of the pages rather than the https.
Intermediate & Advanced SEO | | elenaroi0 -
301 redirect
Hi there, I have some good links pointing to one of my web pages at the moment, however we are just about to launch a new design with new URL structure and I am clear that I need to do a 301 redirect on the URL to the new URL. However, do I keep the old URL live forever? or can I remove it after a while? Kind Regards
Intermediate & Advanced SEO | | Paul780 -
How long should a domain redirect take?
Hi, I know that this is a 'How long is a piece of string?' type question but at what point should the ranking value of site A pass over to site B following a domain 301 redirect? I have shifted a domain over to a new URL, same hosting server, same IP address. I haven't made any URL changes or any content changes other than to change the site logo to match the new domain name. Domain B is basically an exact clone of domain A. I have redirected Domain A to domain B using the following line at the top of the .htaccess file:- Redirect 301 / http://www.newdomain.com/ I have submitted a sitemap for the new domain via google webmaster tools. It looks like the original domain as been completely indexed by google following the redirect as all rankings have been dropped from the results and there are no results for a site:olddomain.com search. Surely the rankings should have switched over at this point? Any help would be much appreciated.
Intermediate & Advanced SEO | | AdeLewis
Ade.0 -
Question about 301 redirect for trailing / ?
I am cleaning up a fairly large site. Some pages have a trailing slash on the end some don't. Some of the existing backlinks built used a trailing slash in the url and some didn't. We aren't concerned with picking a particular one but just want to get one set and stick to it from now on. I am wondering, would I clean this up within the same redirect in the htaccess file that takes care of the www and non www? example RewriteEngine On
Intermediate & Advanced SEO | | PEnterprises
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.domain.com/ [NC]
RewriteRule ^(.*)$ http://domain.com$1 [L,R=301] I currently use that to redirect the www. to the non www as you can see. However here is what I was confused about. Would this code be enough to redirect ALL pages with a / to the ones without? or would I also need to add another code (so there is 2) to my htaccess like below? RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^domain.com/ [NC]
RewriteRule ^(.*)$ http://domain.com$1 [L,R=301] RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.domain.com/ [NC]
RewriteRule ^(.*)$ http://domain.com$1 [L,R=301] That way, now, even the non www pages with a trailing slash will redirect to the non www without the trailing slash. Hopefully you understand what I am getting at. I just want to redirect EVERYTHING to the non www WITHOUT a / Thank you Jake0