Last active
September 12, 2022 03:22
-
-
Save quinncomendant/fca75ba03f3a4b3bf6cf to your computer and use it in GitHub Desktop.
This .htaccess file works with Wordpress installed under a subdirectory wp/ inside the document root.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# Make the admin still accessible from /wp-admin | |
RewriteCond %{REQUEST_URI} ^/wp-admin/?(.*) | |
RewriteRule .* wp/wp-admin/$1 [L,R=301] | |
RewriteCond %{REQUEST_URI} ^/wp/?$ | |
RewriteRule .* wp/wp-admin/ [L,R=301] | |
# Base is the URL path of the home directory | |
RewriteBase / | |
RewriteRule ^$ wp/index.php [L] | |
# Skip real files and directories | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
# Otherwise send it to WordPress | |
RewriteRule .* wp/index.php [L] | |
</IfModule> | |
# END WordPress |
@arin-g It's the main .htaccess file, that completely replaces the one installed by WP.
It works. Thank you!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this the .htaccess file for the root or the subdirectory?