Hide "wordpress/" with .htaccess
-
Hi! I have my WordPress installed in a subfolder. I don’t want to migrate it because if I change my permalinks I will lose all my social shares data.
I’m trying to rewrite the urls with .htaccess. I managed to change all the urls of the website with the following .htaccess (now if you go to “site.com/wordpress/post” it shows “site.com/post”:
Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteBase / RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+wordpress/([^\s]*) [NC] RewriteRule ^ %1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule (?!^wordpress/)^(.*)$ /wordpress/$1 [L,NC]But it doesn’t work with the homepage. It still shows as “site.com/wordpress”. Why is that? What should I add / change? Thanks!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Hide "wordpress/" with .htaccess’ is closed to new replies.