All the files and subfolders that used to make up our old Flash website do not exist anymore and so the URL paths to all the pages are broken.
We could use help writing a Redirect for specific URL’s as well as catch all rewrite rule for subfolders to redirect to the base domain / URL.
ex.) Specific URLs
example.com/home.html
example.com/info.html
Any file path or image/asset or page url within these subfolders redirect to root domain
example.com/flash/devices.html
example.com/flash/images/diagram.png
example.com/external/m2000.zip
New site is built with the latest version of WordPress / Apache / PHP
EDIT
Current .htaccess 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]
RewriteEngine on
RewriteCond %{REQUEST_URI} ^(/home.html|/info.html|/flash|/external)
RewriteRule (.*) http://qcmresearch.com [R=301,L]
</IfModule>
# END WordPress
2
Answers
You can use “https://wordpress.org/plugins/simple-301-redirects/” Simple 301 Redirects plugin for the same.
The below .htaccess rewrite rule will work for you
The online working code for the same is at .htaccess tester
The above code will
Redirect specific url’s like below to root domain
Redirect particular subfolders like below to room domain