How to redirect complete WordPress subfolder from .htaccess file?
2. Click on "File Manager" under the "Files" category to proceed.
3. Click on "Settings" from the top right corner of the page. Select the Document Root
and make sure Show Hidden files(dotfiles) is selected. Remember to click save.
4. Right click on ".htaccess" file and then click on "Edit" to proceed.
5. A pop up page will be shown, then click on the "Edit" button to proceed.
6. Before edit the .htaccess file, you need to copy a backup .htaccess to your local PC.
Existing .htaccess should look something like:
Code:
==================================================
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
==================================================
Add a redirect for complete folder:
Code:
==================================================
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Redirect 301 /oldfolder http://www.yourdomain.com/newfolder
==================================================