I am having a tough time removing the subfolders from the URL in my WordPress site.
Currently, the URL format is:
www.mysite.com/subfolder/index.php/category/postname
I would like to remove both the subfolder AND index.php from the URL.
The site must stay in a subfolder of root on my server.
My current htaccess
file is:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /subfolder/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /subfolder/index.php [L]
</IfModule>
I've tried to add the following, although it did not work.
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^subfolder/(.*)$ http://www.mysite.com/$1 [R=301,L]
RewriteRule .* index.php/$0 [PT,L]