Skip to content

Instantly share code, notes, and snippets.

@mustafauysal
Created August 9, 2023 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mustafauysal/6b3c39f47b4a96a125db3be4c9bb4505 to your computer and use it in GitHub Desktop.
Save mustafauysal/6b3c39f47b4a96a125db3be4c9bb4505 to your computer and use it in GitHub Desktop.
wp-htaccess-with-security-txt-rules - https://wordpress.org/plugins/security-txt-manager/
# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
# Pass .well-known/security.txt to WordPress
RewriteRule ^\.well-known/security\.txt$ index.php [L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment