Commits

Anonymous committed e16bb4d

some needed changes.

Comments (0)

Files changed (3)

couchit/application.py

         else: # redirect to main server if it isn't a subdomain
             response = redirect('http://%s' % settings.SERVER_NAME)
             return response(environ, start_response)
+            
+        if subdomain in views.FORBIDDEN_CNAME:
+            response = redirect('http://%s' % settings.SERVER_NAME)
+            return response(environ, start_response)
 
         if subdomain and subdomain != 'www' and subdomain not in views.FORBIDDEN_CNAME: # get alias
             request.alias = subdomain
     Rule('/site/change-site-address', endpoint='site_address'),
     Rule('/site/settings', endpoint='site_settings'),
     Rule('/site/sitemap.xml', endpoint='sitemap'),
+    Rule('/sitemap.xml', endpoint='sitemap'),
     Rule('/site/changes', endpoint='site_changes'),
     Rule('/site/changes.<feedtype>', endpoint='site_changes'),
     Rule('/site/export.<feedtype>', endpoint='site_export'),
 
 import simplejson as json
 
-FORBIDDEN_PAGES = ['site', 'delete', 'edit', 'create', 'history', 'changes']
+FORBIDDEN_PAGES = ['site', 'delete', 'edit', 'create', 'history', 'changes', 'sitemap.xml']
 
 FORBIDDEN_CNAME = ['mail', 'www', 'blog', 'news', 'media', 'upload', 'files', 'store']