'URL masking not working for URLs that omit the trailing slash
There are a lot of similar questions, but none seem to be the exact fit for me.
I am moving away from a WordPress site to a simple static site.
However, I am currently prohibited from removing the WordPress site hosted in the public_html folder completely until everything is proven to be working with the static site.
I have the static site deployed to a sub-sub folder in my public_html folder e.g. /subfolderA/newSiteFolder.
I have updated the .htaccess to redirect to the sub sub folder using the following:
RewriteEngine on
RewriteCond %{REQUEST_URI} !newSiteFolder/
RewriteCond %{REQUEST_URI} !subfolderA/newSiteFolder/
RewriteRule (.*)$ /subfolderA/newSiteFolder/$1 [L]
This works fine and shows properly in the address bar when navigating the site by pressing links from within the site, however when navigating to the site from an external link, the subfolders are shown in the address bar.
For example, if the about page is clicked from an external link, it shows as
https://example.com/subfolderA/newSiteFolder/about, instead of https://example.com/about.
How can I mask the sub folder names in the address bar when clicked from an external link? Or how best to change my rewrite rules to accomplish this?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
