Skip to content

Commit

Permalink
adding rewrite of old tracker url.
Browse files Browse the repository at this point in the history
  • Loading branch information
padams committed Jan 21, 2022
1 parent 58a66ec commit 5f3d958
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
AddHandler application/x-httpd-php .tpl

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule api/(.*)$ api/index.php?owa_rest_params=$1 [QSA,NC,L]


# Rewrites for new tracker location (../base/js/owa.tracker-combined-min.js) to new location (../base/dist/owa.tracker.js)
# need to properly sniff the protocol or else you could get a CSP error in the browser under https

RewriteCond %{REQUEST_URI} (.*)/modules/base/js/owa.tracker-combined-min.js$
RewriteCond %{HTTP:X-Forwarded-Proto} =https [OR]
RewriteCond %{HTTPS} =on [OR]
RewriteCond %{REQUEST_SCHEME} =https
RewriteRule owa.tracker-combined-min.js$ https://%{HTTP_HOST}%1/modules/base/dist/owa.tracker.js [NC,R=301,L]

RewriteCond %{REQUEST_URI} (.*)/modules/base/js/owa.tracker-combined-min.js$
RewriteCond %{HTTP:X-Forwarded-Proto} =http [OR]
RewriteCond %{HTTPS} =off [OR]
RewriteCond %{REQUEST_SCHEME} =http
RewriteRule owa.tracker-combined-min.js$ http://%{HTTP_HOST}%1/modules/base/dist/owa.tracker.js [NC,R=301,L]

</IfModule>

0 comments on commit 5f3d958

Please sign in to comment.