Skip to content

Commit

Permalink
QSA for static files added
Browse files Browse the repository at this point in the history
  • Loading branch information
cavo789 committed Jul 25, 2018
1 parent 457ac62 commit d7d5cbf
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/htaccess.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,52 +31,52 @@ DirectoryIndex index.php
RewriteRule (.*) router.php?task=task.listfiles.treeview&$2 [L,QSA]

RewriteCond %{REQUEST_URI} robots\.txt$
RewriteRule (.*) router.php?task=task.robotstxt.get [L]
RewriteRule (.*) router.php?task=task.robotstxt.get [L,QSA]

RewriteCond %{REQUEST_URI} search\.php$
RewriteRule (.*) router.php?task=task.search.search [L,QSA]

RewriteCond %{REQUEST_URI} sitemap\.xml$
RewriteRule (.*) router.php?task=task.sitemap.get [L]
RewriteRule (.*) router.php?task=task.sitemap.get [L,QSA]

RewriteCond %{REQUEST_URI} tags\.json$
RewriteRule (.*) router.php?task=task.tags.get [L,QSA]

RewriteCond %{REQUEST_FILENAME} timeline\.(html|json)
RewriteRule (.*) router.php?task=task.timeline.get&file=$1 [L]
RewriteRule (.*) router.php?task=task.timeline.get&file=$1 [L,QSA]

# Access to index.html will be captured and a fake index.html
# will be generated by task.index.get
RewriteCond %{REQUEST_URI} .*\/index\.html?$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) router.php?task=task.index.get&file=$1 [L]
RewriteRule (.*) router.php?task=task.index.get&file=$1 [L,QSA]

# -----------------------------------------------------------------
# Add rewriting for the different filetypes (doc, epub, html, ...)

RewriteCond %{REQUEST_URI} .*\.docx?$
RewriteRule (.*) router.php?task=task.export.docx&file=$1 [L]
RewriteCond %{REQUEST_URI} .*\.epub$
RewriteRule (.*) router.php?task=task.export.epub&file=$1 [L]
RewriteCond %{REQUEST_URI} .*\.html?$

RewriteCond %{REQUEST_URI} .*\.html
# Exception for ELF
RewriteCond %{REQUEST_URI} !.*/elf/libs/elf/*
RewriteRule (.*) router.php?task=task.export.html&file=$1 [L]
RewriteRule (.*) router.php?task=task.export.html&file=$1 [L,QSA]

RewriteCond %{REQUEST_URI} .*\.docx?$
RewriteRule (.*) router.php?task=task.export.docx&file=$1 [L,QSA]
RewriteCond %{REQUEST_URI} .*\.epub$
RewriteRule (.*) router.php?task=task.export.epub&file=$1 [L,QSA]
RewriteCond %{REQUEST_URI} .*\.md$
RewriteRule (.*) router.php?task=task.export.md&file=$1 [L]
RewriteRule (.*) router.php?task=task.export.md&file=$1 [L,QSA]
RewriteCond %{REQUEST_URI} .*\.odt$
RewriteRule (.*) router.php?task=task.export.odt&file=$1 [L]
RewriteRule (.*) router.php?task=task.export.odt&file=$1 [L,QSA]
RewriteCond %{REQUEST_URI} .*\.reveal.pdf$
RewriteRule (.*) router.php?task=task.export.reveal&file=$1 [L]
RewriteRule (.*) router.php?task=task.export.reveal&file=$1 [L,QSA]
RewriteCond %{REQUEST_URI} .*\.pdf$
RewriteRule (.*) router.php?task=task.export.pdf&file=$1 [L]
RewriteRule (.*) router.php?task=task.export.pdf&file=$1 [L,QSA]
RewriteCond %{REQUEST_URI} .*\.remark$
RewriteRule (.*) router.php?task=task.export.remark&file=$1 [L]
RewriteRule (.*) router.php?task=task.export.remark&file=$1 [L,QSA]
RewriteCond %{REQUEST_URI} .*\.reveal$
RewriteRule (.*) router.php?task=task.export.reveal&file=$1 [L]
RewriteRule (.*) router.php?task=task.export.reveal&file=$1 [L,QSA]
RewriteCond %{REQUEST_URI} .*\.te?xt$
RewriteRule (.*) router.php?task=task.export.txt&file=$1 [L]
RewriteRule (.*) router.php?task=task.export.txt&file=$1 [L,QSA]

# -----------------------------------------------------------------
#RewriteCond %{REQUEST_FILENAME} !-f
Expand Down

0 comments on commit d7d5cbf

Please sign in to comment.