You don’t appear to have allowed .htaccess
overrides in the <VirtualHost *:443>
container, so .htaccess
is effectively disabled. Without .htaccess
you’ll naturally get 404s for anything other than the homepage if you are using “pretty” permalinks. (.htaccess
is not required for requests to the homepage, since index.php
is served by mod_dir which is no doubt configured elsewhere in the main server config.)
You need something like this inside the <VirtualHost *:443>
container:
<Directory /var/www/subdomain>
Require all granted
# Enable .htaccess overrides
AllowOverride All
</Directory>
You don’t appear to be allowing access (ie. Require all granted
) in the config you’ve posted so you are presumably handling this outside of the vHost? But make sure you are not enabling access to too much.
Related Posts:
- Directing subdomain to main domain and keeping the subdomain format with .htaccess
- Access sub-domain when root public_html is protected with .htaccess password
- Configure .htaccess to have a WordPress single site installation with all subdomains pointing to the same pages?
- Htaccess for Wordpess set on single subdomain
- Rewrite /?rest_route=/ link to /wp-json/ without changing default permalink structure in apache
- Serve apache 404 for missing assets rather then wp 404 template WP_Rewrites
- index.php not loading in main folder of wordpress
- WordPress site displaying 404 for any page apart from index
- WordPress keeps deleting .htaccess file
- HTAccess stops me from accessing WordPress Dashboard links
- Create subdomain masking for each user in WordPress
- Redirect from different port to subdomain – htaccess
- Site searches by Python for non-existent assets
- Only expose routes with prefix /wp-json on WordPress using Apache
- WildCard SSL with wordpress subdomain
- WordPress overrides custom 404 page with it’s own
- What’s the opposite of required valid user in .htaccess authentication
- How can i redirect one url to another url using .htaccess or add_rewrite_rule
- Override htacces rule only for specific directory
- Restrict uploaded files into a custom folder to logged in users by htaccess: looking for Nginx – not only Apache – solution
- Fixing custom 404 pages broken by WordPress in a subdirectory
- How do I test to ensure that my wp-config file is protected?
- Override 404 page with htaccess
- .htaccess Security Header Rules
- mod_rewrite loop, redirecting http to https on certain section of wordpress blog
- Multisite – 404 when accessing sub-sites
- .htaccess in subdir gets ignored by WordPress’ own .htaccess in /
- WordPress – Promoting A Dev Build In A Subdirectory To Production / Root Directory
- Page preview is shown, updating page gives 404 error
- WordPress category with 404 error
- Redirect old domain with query paramaters
- 404 error Additionally 403 Forbidden error on a URL
- My Homepage Suddenly Disappeared and I Can’t Get It Back
- Does WP suppresses .htaccess if permalinks are disabled?
- fix 302 redirection error on https
- Redirect all subdomains to root domain
- Accepting special characters in querystring
- “Oops.” error on an html file directly uploaded to a subdirectory of my WordPress site
- WordPress permalinks confusion
- htaccess redirects invalid request to home page not 404
- How to use slug with subdomain?
- Unable leverage Browser Caching on AWS Bitnami stack (Apache) through W3TC and Cloudfront CDN
- Downloading zip or tar.gz inside WordPress installation?
- How to move wordpress website from hosting account to localhost
- Clicking PUBLISH Now Redirects to 404 PAGE NOT FOUND
- After changing permalink, getting 404 for one particular category
- How to block wordpress admin by htaccess
- Installing wordpress on subdirectory 2 levels down
- Cannot Override WordPress 404 for a Sub-Directory
- I can access subdirectory, but not files within it
- Issue after changing permalink structure [duplicate]
- In a subdomain network, what .htaccess settings can I use to have WP ignore requests to one subdomain?
- Why ‘Authorization Required’ is coming on wordpress login
- .htaccess for Subdomain and Subfolder w/SSL
- WordPress redirection
- Home page returns 404
- How To Add CSP frame ancestors in WordPress Website? [closed]
- Subfolder install not working
- Permalinks not working on debian with OVH
- Browser Caching .htaccess
- Hardening WordPress – how to set .htaccess permissions?
- All Pages and Post are redirecting to 404 Not Found in wordpress
- Avoid duplicate content on pretty URLs with htaccess
- How can I use an .htaccess file in Nginx?
- .htaccess redirect http to https
- Redirect vs RedirectMatch
- How to automatically redirect HTTP to HTTPS on Apache servers?
- htaccess – Redirect to subfolder without changing browser URL
- How do I disable directory browsing?
- Https to http redirect using htaccess
- Getting a 500 Internal Server Error on Laravel 5+ Ubuntu 14.04
- How to remove index.php from WordPress site URL
- .htaccess: Invalid command ‘RewriteEngine’, perhaps misspelled or defined by a module not included in the server configuration
- Redirect old php link to wordpress link in .htaccess
- Redirect old php link to wordpress link in .htaccess
- Cant login to wp-admin (redirecting to homepage), But CAN login to wp-login.php
- Cant login to wp-admin (redirecting to homepage), But CAN login to wp-login.php
- Best collection of code for your .htaccess file [closed]
- Cannot access non-wordpress subdirectories as wordpress overrides them with a 404 error
- How to create custom 401, 403 and 500 error pages?
- Default .htaccess file for WordPress?
- How do I skip wordpress’s 404 handling and redirect all 404 errors for static files to 404.html?
- Which one does WordPress prioritize when it comes to php.ini, wp-config and .htaccess?
- Improve wordpress security by hiding non public resources
- WordPress site hacked. Has .htaccess been hacked?
- Does this .htaccess security setting really work?
- Use subdomain for certain urls
- WordPress Theme’s 404.php not found, server defaults to Apache’s own 404 page
- htaccess problem after saving Settings
- multisite 404 error for subdirectory
- Multisite htaccess on localhost with WP as an SVN external?
- Stop WordPress and Plugins from Overwriting .htaccess
- File and directory permissions
- htaccess disable WordPress rewrite rules for folder and its contents
- htaccess rewrite conflict with wordpress rules and ssl
- htaccess https redirect from www to non-www
- adding rewrite rules in .htaccess
- .htaccess and 500 error, extra character added
- Name-based virtual host configuration in Apache seems to cause a “500 Internal Server Error”
- Place static HTML files in path below WordPress page