Commit 99715d29 authored by Andreas Valder's avatar Andreas Valder
Browse files

now supporting legacy embed and rss links

parent b9da4e25
......@@ -629,6 +629,22 @@ def sitemap():
return Response(render_template('sitemap.xml', pages=pages), 200, {'Content-Type': 'application/atom+xml'} )
@app.route('/site/')
@app.route('/site/<string:phpfile>')
def legacy(phpfile=None):
if phpfile=='embed.php' and ('lecture' in request.args):
return redirect(url_for('embed', id=request.args['lecture']),code=302)
if phpfile=='feed.php' and ('all' in request.args):
return redirect(url_for('feed'),code=302)
if phpfile=='feed.php' and ('newcourses' in request.args):
return redirect(url_for('courses_feed'),code=302)
if phpfile=='feed.php':
return redirect(url_for('feed', handle=request.args.copy().popitem()[0]),code=302)
print("Unknown legacy url:",request.url)
return redirect(url_for('index'),code=302)
import feeds
import importer
import stats
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment