Issues with redirect from .html pages to wordpress pages - wordpress

here is my issue:
I have a static html site and under blog I have wordpress installed. Now I added a new database and installed a second wordpress that works perfectly, but I want to 301 redirect old .html pages to new ones so I can keep the links and rankings, but every time I try to change the .htaccess file my wordpress totally crashes and I have to re-install.
I just want to redirect dozen .html pages to new wp versions, example, I want to redirect www.site.com/page.html to www.site.com/page/
Can someone point me in the right direction?
Thanks

The easiest way to do this, is to use the redirection plugin for wordpress.
We used it when we converted an old static site and it works well and tracks the number of hit's etc.
http://wordpress.org/extend/plugins/redirection/

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

Wordpress redirecting to wrong homepage

I worked for a few days on XAMPP with a wordpress platform. After I bought a domain, I decided to use Duplicator plugin to transfer my whole wordpress snap to the new server. Everything is working just fine except for one single thing: whenever I go to my website, instead of visiting the actual page that should be "www.example.com/welcome" it redirects automatically to "www.example.com/wordpress". I made some research about it and discovered that usually wp is installed in a wordpress directory, but I completely made sure that:
on htaccess there is no /wordpress directory url
on index.php there is no /wordpress directory url
on wp-config there is no /wordpress directory both on SITE-URL and HOME
made sure that on the wp-admin config panel in the General section, the URLs are both set to the root directory.
For some unexplicable reason, everything is working fine, www.example.com/shop works for example, but if I set from the customization panel a page like "www.example.com/dummy" as homepage, then THAT page won't be found because it automatically redirects "dummy" to "/wordpress" which of course does not exist. You can type www.example.com and be redirected to www.example.com/wordpress and the same thing happens if you type www.example.com/dummy, since now that should be the homepage.
Can anyone explain me why is this happening? I searched everywhere but I can't find an answer.
I'm using the Storefront theme and Woocommerce plugin if that might help.

Redirect image links from old blog (Wordpress multisite)

I have the following scenario:
Everything runs on a wordpress multisite
I used to have a blog on domain A
The blog posts from domain A got transferred to a new blog on domain B. The images on this new blog were still pointing to domain A and were working fine, until...
I created a new website on domain A with a different ID
Now the images on domain B point to domain A, to the upload folder of the old ID and they don't work anymore. I just copied the files from the old blog over to my new blog's ID's upload folder.
Now I guess I need to edit my htaccess file, which is the reason for this question. What's the code I need to use and where do I put it (I guess it goes in the main WP htaccess file)?
I need to redirect all image links from
http://domaina/wp-content/uploads/sites/5/XXXX/XX/XXX.xxx
to
http://domainb/wp-content/uploads/sites/9/XXXX/XX/XXX.xxx
I guess an alternative would be to do it in SQL and rewrite the permalinks, but that's quite high risk and I would prefer the htaccess solution...
If you want to use .htaccess than just put the redirects following the example
Redirect 301 /old-page.html http://new-domain.ru/new-page.html
and yes, use the main .htaccess in the root WP directory

Drupal URLs migrated to new WordPress installation

We have an existing Drupal site. That is going to be replaced with a WordPress site on the existing URL. However, there has been a lot of SEO done on the drupal URLs so a google search will return those old URL's. We want to redirect to the new corresponding URL in the Wordpress site. However, since the drupal site is no longer live on the existing domain, the old URL's will just return 404 and cannot be redirected since they are not relative to the WordPress root. Is there a way to do this? Do I need to get those old drupal site URLs into WordPress somehow?
First of all you need to update your sitemap and add canonical's for permanent redirections. This wont directly redirect the page, but will let the search engines know that the url for the page has been changed and hence will avoid loosing your search engine rankings.
Then for actually redirecting the page you will need to update your htaccess
Redirect 301 /folder/oldpage http://www.example.org/newpage
If there are lots of pages you should consider using a wordpress plugin called redirection. This way you dont have to update the htaccess manually, and it will also keep logs of all the 404 pages that users have found, so you can also keep an eye on logs for any missing pages and redirect them accordingly.

Use title based slugs and archive IDs at the same time

A wordpress site I am working on was previously windows hosted and could not use htaccess to hide the index.php. All 200 or so news items are indexed by the search engines like
sitename.com/index.php/archives/5574‎
The site is now being moved to Linux, and the news items will now be like
sitename.com/big-story-of-the-week
If I change the permalink structure as proposed, is there any way I can get the site to still route the old index.php/archive links?
In your .htaccess file, you can add the following code using your sites URL structure:
Redirect 301 index.php/archives/5574‎ http://sitename.com/big-story-of-the-week
This would have to be done for each page.
More info here: http://wp-mix.com/redirect-urls-htaccess/
(Be sure to backup your .htaccess prior to making changes)

Resources