Last active
December 11, 2022 08:46
-
-
Save andymagill/e56f411a1124f6cf74f87cb0b3252995 to your computer and use it in GitHub Desktop.
HTACCESS rewrite rule not working on SiteGround
This file contains 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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
# don't rewrite anything in docs folder to wordpress | |
RewriteCond %{REQUEST_URI} !^/(docs/*) [NC] | |
RewriteRule . /index.php [L] | |
# rewrite docs | |
RewriteRule ^/docs/Resume-Andrew-Magill.pdf$ "/wp-content/uploads/2019/11/Resume-Andrew-Magill-191112.pdf" [L] | |
RewriteRule ^/docs/Cover-Letter-Andrew-Magill-Dropbox.pdf$ "/wp-content/uploads/2019/11/Cover-Letter-Andrew-Magill-Dropbox-191121.pdf" [L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Okay, I found out why .htaccess are not working
https://ronaldaug.medium.com/why-your-htaccess-rule-doesnt-work-on-siteground-hosting-d2a4fbb55ecb