Here is what I have in my own .htaccess
file that does what you’re looking for:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymLinks
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^example.html$ /wp-content/raw/example.html [L]
RewriteRule ^download$ /wp-content/raw/download-ebook.html [L]
RewriteRule ^thanks$ /wp-content/raw/book-opt-in-thank-you.html [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Related Posts:
- Best collection of code for your .htaccess file [closed]
- .htaccess for wordpress in separate folder
- WordPress best solution shared theme for consumers and businesses (two url’s one instaltion)
- WordPress On subfolder
- Hardening wordpress: blocking /includes with htaccess
- create a static folder independent with WordPress
- How can I stop WordPress from catching URL’s for static pages that I save on my server
- Improve wordpress security by hiding non public resources
- htaccess rewrite conflict with wordpress rules and ssl
- Plugin to edit htaccess file
- .htaccess file redirecting to parent directory
- Serve apache 404 for missing assets rather then wp 404 template WP_Rewrites
- Permalinks not working on second wordpress installed in a subdirect
- Rewrite rule not working
- Change wp-content without changing the name of the folder
- Using “wordpress_logged_in” to restrict direct access to uploads folder in 2021
- Temporary .htaccess blocking is disabling WP Crons from running?
- How to restrict access to wp-content, wp-includes and all sub-folders
- .htaccess redirects disappeared after re-saving permalinks
- Is it possible to dynamically redirect URL using htaccess?
- Which WordPress scripts need to be executable for a fresh installation?
- Keep getting 401 error from WordPress on AWS Lightsail
- Setup Permanent 301 Redirects after moving to Https [closed]
- Force www to non-www on a subdomain in WordPress?
- WordPress multilingual website domain and folders
- Attach to wp-login.php and xmlrpc.php
- WP site URL changed to have HTTPS but still homepage does not redirect
- need a help for modify .htaccess rule [closed]
- XMLRPC filtering through htaccess not working
- Corrupt .htaccess file
- Cache policy not updated according to PageSpeed
- .htaccess ‘down for maitenance’ and WordPress
- What’s the opposite of required valid user in .htaccess authentication
- Which is better: 301 Redirect in my .htaccess file or a plugin like Redirection?
- How can i redirect one url to another url using .htaccess or add_rewrite_rule
- When is it necessary to have Header unset Vary in .htaccess
- Redirect http to https does not work on subdir where another instance of WordPress installed
- Fixing custom 404 pages broken by WordPress in a subdirectory
- redirect the homepage using .htaccess outside of WordPress
- I can’t access the admin panel links as I click it shows 403 error
- Https Redirect infinite loop in Mobile browsers
- How to hide login form if basic authentication fails?
- Redirect an old link to new site homepage [closed]
- RSS feed for deleted posts and comments
- WordPress slugs and 404 handling takes preference over folders in site root?
- .htaccess rewriting old RSS feed URL to WordPress feed URL
- How can I set Cache TTL for woff and woff2 font files with htaccess?
- WordPress – Promoting A Dev Build In A Subdirectory To Production / Root Directory
- .htaccess RewriteRule always overwritten – how to prevent?
- How to create a redirect in the .htaccess file, with 2 exceptions
- Redirect old domain with query paramaters
- What might be removing my redirects from my htaccess?
- My Homepage Suddenly Disappeared and I Can’t Get It Back
- How to turn this .htaccess rule into a dynamic rule with add_rewrite_rule, et al?
- WordPress .htaccess to consider blog as directory
- Disable directory browsing of uploads folder
- Local PC cache stays filled with old WordPress Site data
- Password protect directory but not files
- WordPress JSON API restrict to specific domain
- fix 302 redirection error on https
- main-domain of wordpress keep redirecting to subdomain
- How to deny access to a particular wordpress site url
- Rewrite Rules not redirecting rewrite
- How do i allow access to a single file in my root directory? [closed]
- Rewrite URL in address bar for a specific page [closed]
- Home links redirects to old site
- Selectively Disabling PHP via .htaccess in Root Directory
- Shared hosting, multiple sites, can’t log in to WP due to .htaccess redirection
- What causes 404 errors that forces you to rebuild a .htaccess file?
- Configure .htaccess to have a WordPress single site installation with all subdomains pointing to the same pages?
- Rewriting subfolders to specific parent folder in WordPress
- Azure WordPress deny access to xmlrpc
- Xampp is not loading media
- domain redirection is not working from old to new
- Deny,Allow on .htaccess isn’t working
- execute cron jobs when .htaccess login protected?
- Using htaccess to prevent spam through wp-comments-post.php
- Install second wordpress in root subfolder, Error 404
- change URIs of migrated site
- Remove subdirectory from links
- modifying htaccess for localhost with a custom port
- Problems with running a 2nd installation of WordPress on my domain?
- .htaccess redirects for posts in new directory and new domain
- Steps for WordPress over SSL
- Fixing Access-Control-Allow-Origin (CORS origin) for multiple subdomains
- domain.in/wp-admin give the result to 403 Access to this resource on the server is denied!
- insert_with_markers() WordPress & htaccess help
- Restrict Content for only Contributors via .htaccess
- Redirect from domain.com to subdomain.domain.com
- MAMP.app & .htaccess – Can’t override after config
- register_post_type and register taxonomy and htaccess
- Cannot find webarh/malware redirect infection that only shows on Chrome
- Why ‘Authorization Required’ is coming on wordpress login
- Restricting direct downloads of wp content files, but allow them on the website.
- Forward blog requests to another URL
- Custom Search only for my Custom Taxonomy Page – data
- .htaccess rewrite rule stopped working for wordpress site after moving server
- WordPress redirection
- Home page returns 404
- Browser Caching .htaccess