WordPress 301 redirects for 300 links to redirect in .htaccess? - wordpress

my question is would it slow my website? I am migrating from a non WP CMS to a WP CMS which means there are quite a fair deal of links to redirect due to a different URL structure. I plan on doing my redirects as follows: Redirect 301 /old-page/ http://www.newwebsite.com/new-page/
I include that line below the # END WordPress.
So basically there will be roughly 300 lines of Redirect 301 ... in my .htaccess file.
Would this really slow down my site? I have to include all the 300 redirects and I'm using WP.
Thanks

Are you looking to redirect your entire site to a new domain or only migrating from a static site to CMS? What's your current permalink structure? Why are you planning to redirect it, you can customize your permalink structure in wordpress to fit your existing structure.

Related

how to redirect wp past site without wordpress pages

Client no longer wants Wordpress and wants new site in HTML5 CSS3. I have the past site map with links to past pages. Seeing he no longer has Wordpress how do you redirect the old wordpress pages without wordpress to new html pages. His links to old site are still active but goes no where seeing the pages are no longer on the server and have been down for two weeks. Small site 4 pages. Thanks Tim
Since you are using WordPress, I am guessing that this is hosted on a Linux server. If so, you are able to create 301 redirects using the .htaccess file.
Here is an example
Old page: http://www.example.com/contact-us
Going to new page: http://www.example.com/contact.html
RedirectMatch 301 ^/contact-us/?$ http://www.example.com/contact.html

.htaccess reditrect subdirectory page to root

I got a website running and in the subdirectory domain.com/blog/ I installed a Wordpress blog website. The subdirectory contains dozen of blog articles, for example
domain .com/blog/testing
domain .com/blog/example
domain .com/blog/article1
domain .com/blog/article2
And what I am trying to do is to rewrite and redirect (a single page) domain.com/blog/example to domain.com/example
Any way to do this?
It seems javascript redirect is better than htaccess redirect for your case.
Simply edit your article using a code editor in wordpress.
<script>window.location = "http://www.yourhomepage.com";</script>

Redirect 301 - htaccess or plugin?

after a migration from a custom cms to WordPress I have about 1500 404 errors.
The old cms used to print the date into the post url and I have removed that and set a proper SEO url structure.
Now, since I need to create 301 redirect for all of them, each one by one, what is the best practice?
Should I insert them all into the htaccess file or managing them with a plugin?
Will all these redirections slow down the website?
Thank you all!
Both solutions will work but
1) .htaccess will have the best redirect speed because it is not part of WP.
2) Plugin will allow to use wp interface for editing but redirect a little bit slower (not critical)
Usually redirects don't slow down website speed tangibly

301 redirect in htaccess not working as expected

I am trying to add a simple 301 redirect to a website's htaccess, but no redirection is occurring, nor am I encountering any errors--can anyone shed some light? The redirect would redirect people visiting an old blog post to a new page:
old blog post: https://www.horizonhomes-samui.com/horizon-homes-construction/
new page: https://www.horizonhomes-samui.com/construction/
The redirect code I'm using is:
Redirect 301 /horizon-homes-construction/ https://www.horizonhomes-samui.com/construction/
Possibly Relevant Info
My site is a Wordpress site.
I also tried adding a "RewriteEngine On" line to the top, but that did not resolve the issue.
The htaccess file I'm editing is located in my WordPress root directory (along with wp-content, wp-admin, index.php, etc).
The instructions I'm following for adding the 301 redirect are from this guide.
Thanks.
When you don't have a lot of control over the server, which is the case for a lot of wordpress sites, a plugin is better than trying to update the .htaccess file.
I am sure there are a lot of good plugins that do this. This one has worked for us.
https://wordpress.org/plugins/redirection/
With the help of my server admin, I ascertained why this 301 redirect was not working. It is because my site is on an Nginx server, so any redirects added to htaccess will not be read by the server. My server admin was able to add the redirects properly.

Can not redirect php pages on WordPress multisite

I have been battling redirects all day. We have a customer with an old site, and all the old php links are broken and will redirect you to a 500 error page.
I have tried 3 different 301 redirect plugins all with the same result - regular pages will redirect, and .php pages will not.
I have also tried to redirect from /folder/file(.*) - but with no succes.
This page is made on a WordPress multisite installation so i need a solution where i do not have to add all redirects in the .htaccess file.

Resources