So I've been trying this for a long time, but I can't seem to get it to work. Pretend my website is https://example.com
, with the additional pages https://example.com/abc
and https://example.com/abc-def-g
.
The plan is for all pages, both those that exist and those that don't, to automatically redirect to the homepage, with the exception of the two pages listed above.
Everything I've tried has failed, either preventing me from accessing the website or just doing nothing at all, so I'm trying to start fresh on a blank slate.
This is the .htaccess
file at the moment:
# 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
# BEGIN EWWWIO
# END EWWWIO
This is the standard file for WordPress. Any help would be much appreciated!