using notepad to enforce secure page. Format is UTF-8.
The problem is that Windows Notepad saves UTF-8 files with a Byte Order Mark (BOM) – which it uses to identify the file encoding (other systems, Apache included, do not require this). If you look at the saved file in a hex editor, you will see the 3 bytes EF BB BF
(that displays as 
in CP1252) at the start of the file.
It is likely that this BOM is breaking Apache. (I would perhaps expect you are seeing a 500 Internal Server Error response?)
If using Notepad, save as “ANSI” (for simple files like this), or use a different editor.
Related Posts:
- Default .htaccess file for WordPress?
- Which one does WordPress prioritize when it comes to php.ini, wp-config and .htaccess?
- Does this .htaccess security setting really work?
- htaccess disable WordPress rewrite rules for folder and its contents
- Admin-Ajax.php, SSL, Non-SSL
- How disable SSL redirect for specific URL?
- WordPress site displaying 404 for any page apart from index
- Why does the header set X-Robots-Tag apply to all pages?
- How to avoid wordpress permalink rules to inherit in a sub-folder
- Error:406 not acceptable
- .htaccess Rewrite URL WordPress
- A plugin changes my .htaccess file and I can’t access httpd.conf as that’s a shared server
- Cant block wordpress readme files
- WordPress keeps deleting .htaccess file
- How can I code my plugin to safely modify .htaccess?
- WordPress URL/Folder ReWrite using Htaccess
- HTAccess stops me from accessing WordPress Dashboard links
- .htaccess redirects no longer work
- Exclude subfolder from WP-redirect works with html but not php files
- Server crashed trying to restore wordpress multisite, images are not found pls help
- Create subdomain masking for each user in WordPress
- Redirect from different port to subdomain – htaccess
- .htaccess rewrite rule puzzle
- WordPress Redirect 301 register page
- Allow logged in users who doesn’t belong to whitelisted ips
- Best way to redirect site in subdirectory to root?
- Missing slash after moving site to subfolder
- WildCard SSL with wordpress subdomain
- Install a Network under a mapped domain
- browser caching not disabled after disabling in .htaccess
- Transfer to HTTPS – mixed content on main page only [closed]
- Htaccess redirect after changing Language URL format
- How do I test to ensure that my wp-config file is protected?
- Adding a SSL Certificate
- .htaccess Security Header Rules
- Modify the .htaccess file
- mod_rewrite loop, redirecting http to https on certain section of wordpress blog
- .htaccess in subdir gets ignored by WordPress’ own .htaccess in /
- Rules in .htaccess only if the requested URL is /wp-admin
- What to write in the htaccess in order to detect browser language and point accordingly?
- want to rewrite an URL in wordpress
- how to redirect 301 my old search query string to wordpress search query string?
- htaccess, site and staging in subdirectories
- WordPress sites in subfolders
- Admin Panel Slowdown After SSL Verification
- WordPress category with 404 error
- How to block access to files without modifying .htaccess or ngnix config? [closed]
- Allow REST API over HTTP, the rest of the site forced to HTTPS
- where to add redirection rewriterule in .htaccess file?
- How do I apply friendly URL permalinks to a custom WordPress template?
- Conflict with Force SSL and Rewrite Rules
- create virtual subdomains for a bunch of urls on a site via .htaccess
- htaccess problem not being able to overwrite previous rules
- wordpress blog displaying blank pages [closed]
- Relative links stop working after moving wordpress site from hosting to localhost
- WordPress site blacklisted by Google about .htaccess [closed]
- How to rewrite 404 to home page using htaccess?
- How to fix .htaccess corrupted
- “Oops.” error on an html file directly uploaded to a subdirectory of my WordPress site
- How do I reset a rewrite?
- VServer/Rootserver/Shared Hosting: Multiple WordPress installations each having their unique domain?
- WP Codex answer incomplete? Put WP in subdirectory. .htaccess change required
- All navigation links on website redirect to same page
- WordPress is removing trailing slash
- Sub domain URL slash / missing after domain and before Post & page slug
- Problem with WordPress permalinks
- Htaccess file reset automatically how to fix this issue
- Clone WordPress for testing on localhost (with Fiddler)
- Force a 403 response to xml file in WordPress
- Redirect files in uploads directory if WordPress user not logged in
- Redirect wordpress site to www from non www on wordpress server
- Update htaccess in several WP sites at once
- I need to make one folder private
- Pretty Url not working on the server
- How to use slug with subdomain?
- Force HTTPS for mapped domain pointing to wordpress domain
- How can I restrict access, by IP, to the `wp-admin` folder/Dashboard?
- Reversing domain ‘sharding’ with htaccess
- After changing permalink, getting 404 for one particular category
- Htaccess remove dates from root site but not from subdomain
- .htaccess home configuration
- Cannot Override WordPress 404 for a Sub-Directory
- I can access subdirectory, but not files within it
- htaccess mod_rewrite not working
- adding a rewrite rule in wordpress functions file
- Multisite permalinks for subfolder wordpress installation
- Redirect not working
- Giving WordPress it’s own directory and using .htaccess Directory Index
- Restrict download files from not generated Urls
- How to change wordpress news root url
- Problem with All in one WP Migration – only works the home page
- .htaccess for Subdomain and Subfolder w/SSL
- WordPress sections in htaccess kills FrontPage permissions
- How can I stop WordPress from catching URL’s for static pages that I save on my server
- Why my wp site always redirecting to the old website path..?
- Hiding wp-config.php via .htaccess on an install installed in another directory?
- Enable webp support Nginx+Apache reverse proxy with moss.sh [closed]
- WordPress redirection
- Home page returns 404
- Browser Caching .htaccess