summary refs log tree commit diff
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2016-06-04 11:39:40 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2016-06-04 11:39:40 +0200
commit00221fad40b931bbab7d3f8b15731453c671fff0 (patch)
tree1ed491c6423fabc20eb44d7ee89e6f24379f6408
parentc0716886d8de04c05abd07c89d3b3bb460da1db7 (diff)
downloadyoutube-dl-00221fad40b931bbab7d3f8b15731453c671fff0.tar.gz
youtube-dl-00221fad40b931bbab7d3f8b15731453c671fff0.tar.xz
youtube-dl-00221fad40b931bbab7d3f8b15731453c671fff0.zip
add better rewrite rules
-rw-r--r--.htaccess4
-rw-r--r--latest/.git_dont_delete0
-rw-r--r--latest/.gitignore1
-rwxr-xr-xupdate_latest.sh3
4 files changed, 6 insertions, 2 deletions
diff --git a/.htaccess b/.htaccess
index 3de1fb372..5b9647118 100644
--- a/.htaccess
+++ b/.htaccess
@@ -11,5 +11,9 @@ RewriteRule ^(faq-)?anime$ https://github.com/rg3/youtube-dl/blob/master/README.
 RewriteRule ^(faq-)?citw$ https://github.com/rg3/youtube-dl/blob/master/README.md#do-i-always-have-to-pass-in---max-quality-format-or--citw [R=302,L,NE]
 RewriteRule ^example-url$ https://github.com/rg3/youtube-dl/blob/master/CONTRIBUTING.md#is-the-description-of-the-issue-itself-sufficient [R=302,L,NE]
 RewriteRule ^g403$ https://github.com/rg3/youtube-dl/blob/master/README.md#i-extracted-a-video-url-with--g-but-it-does-not-play-on-another-machine--in-my-webbrowser [R=302,L,NE]
+ 
+RewriteRule ^latest/version$ latest_version [L,T=text/plain]
+RewriteRule ^latest_version$ - [T=text/plain]
+RewriteRule ^latest/(.*)$ /downloads/latest/$1 [R=302,L]
 
 
diff --git a/latest/.git_dont_delete b/latest/.git_dont_delete
deleted file mode 100644
index e69de29bb..000000000
--- a/latest/.git_dont_delete
+++ /dev/null
diff --git a/latest/.gitignore b/latest/.gitignore
deleted file mode 100644
index 03c88fd7a..000000000
--- a/latest/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-.htaccess
diff --git a/update_latest.sh b/update_latest.sh
index b2382aa6a..0144c7c44 100755
--- a/update_latest.sh
+++ b/update_latest.sh
@@ -11,4 +11,5 @@ fi
 cd "$(dirname $(readlink -f $0))"
 
 echo -n "$version" > latest_version
-/bin/echo -e "RewriteEngine On\nRewriteRule ^(.*)$ /downloads/latest/$1 [L,R=302]" > latest/.htaccess
+ln -sf downloads/latest downloads/$1
+