Permalink
Browse files

redirect to wikigifs.org

  • Loading branch information...
1 parent 7c1e4e9 commit c7573793bd67c12363d66e9b85e861ca85281f52 @jpf committed Dec 12, 2012
Showing with 7 additions and 2 deletions.
  1. +6 −1 app.py
  2. +1 −1 templates/index.html
View
7 app.py
@@ -2,7 +2,8 @@
import random
import urllib
import json
-from flask import Flask, request, Response, url_for, render_template
+from urlparse import urlparse
+from flask import Flask, request, Response, url_for, render_template, redirect
app = Flask(__name__)
data = []
@@ -25,6 +26,10 @@ def randompick():
@app.route("/")
def index():
+ request_url = urlparse(request.url)
+ print request_url.netloc
+ if request_url.netloc == 'wikigifs.herokuapp.com':
+ return redirect('http://www.wikigifs.org', 301)
return render_template('index.html', random_service=url_for('randompick', _external=True))
View
@@ -43,7 +43,7 @@
</table>
<script>
var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-36921755-1']);
+ _gaq.push(['_setAccount', 'UA-36921755-2']);
_gaq.push(['_trackPageview']);
(function() {

0 comments on commit c757379

Please sign in to comment.