Created
March 8, 2013 19:01
-
-
Save erikrose/5118912 to your computer and use it in GitHub Desktop.
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
# Not strictly necessary but should save a lot of RewriteConds and fstats: | |
RewriteRule ^/search$ - [L] | |
RewriteRule ^$ - [L] | |
RewriteRule ^/static($|/.*) - [L] | |
RewriteRule ^.*/$ - [L] # Don't muck with the front page or any directory-browing page. | |
# Append ".html" to files in the tree but not to ones that exist as requested... | |
RewriteCond /home/vagrant/dxr/tests/test_basic/target/trees%{REQUEST_FILENAME} !-f | |
# ...and not to folders: | |
RewriteCond /home/vagrant/dxr/tests/test_basic/target/trees%{REQUEST_FILENAME} !-d | |
# Don't report a 404 on a rewritten address; that's confusing: | |
RewriteCond /home/vagrant/dxr/tests/test_basic/target/trees%{REQUEST_FILENAME}.html -f | |
RewriteRule (.*) %{REQUEST_FILENAME}.html [L,PT] | |
DirectoryIndex '.dxr-directory-index.html' index.html | |
Alias /static/ /home/vagrant/dxr/dxr/static/ # for JS, CSS, and images | |
AliasMatch ^((?!/search$).*$) /home/vagrant/dxr/tests/test_basic/target/trees/$1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment