Skip to content

Instantly share code, notes, and snippets.

@rutcreate
Created July 23, 2018 07:29
Show Gist options
  • Save rutcreate/6c70563b55a49367b83974c08160627f to your computer and use it in GitHub Desktop.
Save rutcreate/6c70563b55a49367b83974c08160627f to your computer and use it in GitHub Desktop.
Splash page using .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^\/(.*)-(anteroexternal)([0-9]+)\/slum([0-9]+)\/(.*)$ ?anteroexternal$3=$4&%{QUERY_STRING}[L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteCond %{REQUEST_URI} ^/$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.youdomain.org [NC]
RewriteRule ^ https://www.youdomain.org/splash [R=302,L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment