Browse Source

add better rewrite rules

Philipp Hagemeister 9 years ago
parent
commit
00221fad40
4 changed files with 6 additions and 2 deletions
  1. 4 0
      .htaccess
  2. 0 0
      latest/.git_dont_delete
  3. 0 1
      latest/.gitignore
  4. 2 1
      update_latest.sh

+ 4 - 0
.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 ^(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 ^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 ^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]
 
 
 
 

+ 0 - 0
latest/.git_dont_delete


+ 0 - 1
latest/.gitignore

@@ -1 +0,0 @@
-.htaccess

+ 2 - 1
update_latest.sh

@@ -11,4 +11,5 @@ fi
 cd "$(dirname $(readlink -f $0))"
 cd "$(dirname $(readlink -f $0))"
 
 
 echo -n "$version" > latest_version
 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
+