.HTACCESS Tricks

301 Redirect from 1 URL to another URL
    #URL REDIRECTS Redirect 301 /old_path(no http:// needed) new_path(http:// needed)  
Mon, 5 Nov, 2018 at 3:21 PM
Cross Domain Resource Loading
    <IfModule mod_headers.c> Header add Access-Control-Allow-Origin "*" </IfModule>  
Mon, 5 Nov, 2018 at 3:21 PM
.htaccess Cheat Sheet
Visit the link below for an extensive break down of the .htacess file and all it can do. http://htaccesscheatsheet.com
Mon, 5 Nov, 2018 at 3:25 PM
Query String Re-directs
The below is a sample.  You must change the values to meet your needs. RewriteCond %{QUERY_STRING} newsletter-category=546 RewriteRule (.*) /eur/newsle...
Mon, 5 Nov, 2018 at 3:21 PM
Icons Not Showing
<IfModule mod_headers.c> <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$"> Header set Access-Control-Allow-Origin &...
Wed, 11 Sep, 2019 at 7:57 AM
301 redirect from sub folder to root folder
RewriteEngine On RewriteCond %{HTTP_HOST}  ^(www\.)?MAIN_DOMAIN\.COM [NC] RewriteRule ^SUB_FOLDER_NAME/?(.*)$  /$1  [R=301,L]
Tue, 9 Jun, 2020 at 1:22 PM
Cors - Access-Control-Allow-Origin
<IfModule mod_headers.c> <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$"> Header set Access-Control-Allow-Origin ...
Thu, 5 Nov, 2020 at 9:10 AM
Force HTTPS
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Sun, 7 Jan, 2024 at 12:45 PM