3

You are close. RewriteCond %{HTTP_HOST} ^sub-domain\.example\.com$ [NC] RewriteRule ^(.*)$ https://www.example.com/newpage.html [R=301,L] --or-- RewriteCond %{HTTP_HOST} ^sub-domain\.example\.com$ [NC] RewriteRule ^(.*)$ https://www.example.com/folder/ [R=301,L] I included the second example in case you want it. I also use R=301,L. R,L is nearly the ...


2

Redirect 301 /page/page-a/ /page/page-b/ [R,L] On Apache this would have resulted in a 500 Internal Server Error because the [R,L] argument is not valid on a mod_alias Redirect directive. [R,L] are RewriteRule (mod_rewrite) flags. or it displays www.example.com/page/page-b/?type=page&id=page-a This is the result of a conflict between mod_alias (...


2

Google won't index pages which redirect. Why would they index a page which simply redirects to another page that's already in the index? If you want your domain to be the "main" URL for the page, then you need to change the A records (and remove the CNAME record) as per GitHub's instructions (the Namecheap instructions you followed appear to be for setting ...


1

Never mind. I had to clear my cache and decided to place the .htaccess file in the folder for the website that I have the SSL for. Problem resolved.


1

To answer your questions properly you should paste the code you are using for the redirect first, however I won't do that, check below for what I believe you should do. You don not need to implement a 301 redirect here, that could complicate things more in the future. Besides that, how many redirects would you need? I would suggest to implement a ...


Only top voted, non community-wiki answers of a minimum length are eligible