Skip to content

Instantly share code, notes, and snippets.

@jlav1n
Last active August 29, 2015 14:28
Show Gist options
  • Save jlav1n/ba9c5184f1373397eb2c to your computer and use it in GitHub Desktop.
Save jlav1n/ba9c5184f1373397eb2c to your computer and use it in GitHub Desktop.
Interchange catalog at root URL. Prevents Interchange from having to handle all 404 requests, unless the request does not have an extension, or is a known file type that IC serves.
ScriptAlias /cgi-bin/ /home/mysite/cgi-bin/
RewriteEngine On
RewriteRule ^/index(\.html?)?$ / [R=301]
RewriteRule ^/?$ /cgi-bin/mysite/index [L,NS,PT]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -f
RewriteRule ^ - [L,NS]
RewriteCond %{REQUEST_FILENAME} \.
RewriteCond %{REQUEST_FILENAME} !\.(?:html|txt|xml|pdf|iif)$
RewriteRule ^ - [L,NS]
RewriteCond %{REQUEST_FILENAME} !^/cgi-bin/.+
RewriteRule ^(.+)$ /cgi-bin/mysite$1 [L,NS,PT]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment