How to modify .htaccess file to rewirite https to specific pages and directories for WordPress site? - wordpress

None of the answers i searched on Google and this site give me the correct answer. It was either because it wasn't for WordPress based platform or it wasn't for pages permalinks.
Anyway, my site using permalinks to get better SEO performance over the regular page ID names. I have one specific page that i want to secure with HTTPS (SSL Socket), a directory under /wp-content/themes/my-theme (/wp-sec), and of course the /wp-admin directory/folder and /login.php page. All the other pages should be HTTP even if i will try to write the link as HTTPS.
The specific page ID is 3519 (/?page_id=3519) and it's permalink is "test".
PLEASE, if you don't know and you are not expert don't answer this question.
Thanks.

Related

WordPress domain redirection

Beginner question:
I need to perform a 301 redirect from one Wordpress site (domain), to another Wordpress domain, like this:
From:
http://mycompany.com
To:
http://mycompany.se
A problem is that I have no FTP credentials for my From-site. I can't reach the .htaccess file.
Is there a plugin to use? I have studied the Redirection plugin, but this one seems working on pages within the same domain only(?)
I guess I need to be careful, because if some plugin edits the .htaccess file and something breaks, I can't reach the file...
Thankful for any help!
Whit Redirection Plugin you can redirect a url from old to new website.
You can create and manage redirects quickly and easily without needing Apache or Nginx knowledge. If your WordPress supports permalinks then you can use Redirection to redirect any URL.
There is full support for regular expressions so you can create redirect patterns to match any number of URLs.
The plugin can also be configured to monitor when post or page permalinks are changed and automatically create a redirect to the new URL.
You can easily find multiple plugins to perform 301 redirection in wordpress,but if you want to edit .htaccess you can install the plugin called "WP htaccess control" https://wordpress.org/plugins/wp-htaccess-control/ .
Through this plugin you can edit the .hraccess file from admin side.
Thanks.

HTTPS to HTTP redirect via .htaccess

I have a website hosted on a GoDaddy wordpress hosting. We had an SSL, but not longer have the SSL. Google archive some pages with the SSL so I just want to redirect https requests to the http version of the sit.e I have access to the .htaccess file so I figured that was the best way to do it.
I have been searching around and tried tons of different .htaccess redirects, but none of them are working. Including this https to http 301 redirect via htaccess. I know the htaccess is functioning because wordpress is working and I added a few test redirects to it and they worked as well.
Any thoughts or suggestions would be much appreciated.
Thanks.
Wordpress has its own redirect procedure.
Check in the General Settings of you WP Panel for the WordPress Address and the Site Address fields. Make sure they both are non ssl absolute paths.
Another thing to check is on the wp-config.php
define('FORCE_SSL_ADMIN', true);
That could have been added by another plugin. Remove it or make it false.
One last thing you could try (not the best option) is to ask google to remove those specific links, here's a reference for that.
I hope this helps.

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.

How to Remove redirection on magento site?

There is a problem on my client site.Due to some of the redirections set up for magento.. I am not able to access the wordpress pages.. Whenever I try to access a wordpress page, I am redirected to a magento 404 not found page.... so please let me know how to remove redirection on my magento site??
Your question is ambiguous. Is it the rewriting in .htaccess (or somewhere else) doing the redirect, or do they have redirects in the core_url_rewrite table that conflicts?
I would guess the former. You need to create an alias or location for your Wordpress area that are distinctly different from your Magento area. Often this is accomplished through a separate subdomain, like http://blog.example.com/ or through a suffix like http://www.example.com/blog/.

Wordpress URL rewrite

I am trying to merge my custom made directory site together with my wordpress site in one domain.
There seems to be issues with the url being redirected to my wordpress categories. How can i rewrite url in wordpress to compliment my directory site.
I don't think it's possible. Category, tag, page, post etc. slugs could collide with your directory names. You would have to either create a filter for WP to redirect specific URLs to your old content or modify your .htaccess file. Both methods are extremely complicated if you have a lot of pages, and overkill if you have only a few.
Why not migrate your old content to WP? Or if you don't want to do that, install WP into a subdirectory of your site, like /blog.

Resources