| default_controller = 'pages'
default_function = 'index'
routes_in = (
((r'.*https?://www.web2pyref.com', r'.*https?://www.web2pyref.com/index')),
# Google domain checks
((r'.*https?://www.web2pyref.com.* /google123456789.html', r'/web2pyref/static/google123456789.html')),
# Needed for contact form
((r'.*https?://www.web2pyref.com.* /web2pyref/default/contact_form(?P<any>.*)', r'/web2pyref/default/contact_form.load')),
# Search functions
((r'.*https?://www.web2pyref.com.* /search(?P<any>.*)', r'/web2pyref/find/search\g<any>')),
# Tags Page
((r'.*https?://www.web2pyref.com.* /tags/(?P<any>.*)', r'/web2pyref/pages/show_page/tags/\g<any>')),
# Apps' download link
((r'.*https?://www.web2pyref.com.* /w2p/download/(?P<any>.*)', r'/web2pyref/references/download/\g<any>')),
# Tags functions
('/web2pyref/plugin_tagging/index/$anything', '/web2pyref/plugin_tagging/index/$anything'),
# Plugin Rate
('/web2pyref/plugin_rating/rate/$anything', '/web2pyref/plugin_rating/rate/$anything'),
# Comments functions
('/web2pyref/comments/$anything', '/web2pyref/comments/$anything'),
# do not reroute admin unless you want to disable it
#('/admin', '/admin/default/index'),
#('/admin/$anything', '/admin/$anything'),
# do not reroute appadmin unless you want to disable it
#('/$app/appadmin', '/$app/appadmin/index'),
#('/$app/appadmin/$anything', '/$app/appadmin/$anything'),
# Images' location
('/static/images/pages_content/$anything', '/web2pyref/static/images/pages_content/$anything'),
# Login functions
(r'/user(?P<any>.*)', r'/web2pyref/default/user\g<any>'),
(r'/home(?P<any>.*)', r'/web2pyref/home\g<any>'),
# Static Files
('/static/(?P<any>.*)','/web2pyref/static/$any'),
('/index', '/web2pyref/pages/show_page/index'),
# do not reroute static files
('/$app/static/$anything', '/$app/static/$anything'),
# reroute favicon and robots, use exable for lack of better choice
('/favicon.ico', '/web2pyref/static/favicon.ico'),
('/robots.txt', '/web2pyref/static/robots.txt'),
# do other stuff
((r'.*https?://www.web2pyref.com.* /web2pyref/plugin_tagging(?P<any>.*)', r'/web2pyref/plugin_tagging\g<any>')),
((r'.*https?://www.web2pyref.com.* /', r'/web2pyref/pages/show_page/index')),
((r'.*https?://www.web2pyref.com.* (?P<any>.*)', r'/web2pyref/pages/show_page\g<any>')),
('/$anything', '/$anything')
)
routes_out = (
((r'/web2pyref/pages/show_page/index', r'.*https?://www.web2pyref.com')),
((r'.*https?://www.web2pyref.com.* /web2pyref/comments/example/(?P<any>.*)', r'/example/\g<any>')),
((r'.*https?://www.web2pyref.com.* /web2pyref/comments/reference/(?P<any>.*)', r'/reference/\g<any>')),
## Display tags page properly
((r'.*https?://www.web2pyref.com.* /web2pyref/pages/show_page/tags/(?P<any>.*)', r'/tags/\g<any>')),
## Search page
(r'.*https?://www.web2pyref.com.* /web2pyref/find/search(?P<any>.*)', r'/search\g<any>'),
('/web2pyref/find/search','/search'),
## Download files from reference page
(r'.*https?://www.web2pyref.com.* /web2pyref/references/download/(?P<any>.*)', r'/w2p/download/\g<any>'),
# Plugin Favorite
('/web2pyref/plugin_favourite/$anything', '/web2pyref/plugin_favourite/$anything'),
# Plugin rate
('/web2pyref/plugin_rating/rate/$anything', '/web2pyref/plugin_rating/rate/$anything'),
('/web2pyref/comments/$anything', '/web2pyref/comments/$anything'),
# do not reroute admin unless you want to disable it
('/admin/$anything','/admin/$anything'),
# do not reroute appadmin unless you want to disable it
('/$app/appadmin/$anything', '/$app/appadmin/$anything'),
('/web2pyref/static/(?P<any>.*)','/web2pyref/static/$any'),
(r'.*https?://www.web2pyref.com.* /web2pyref/pages/show_page/index', r'/'),
('/web2pyref/default/index','/'),
# do not reroute static files
('/$app/static/$anything', '/$app/static/$anything'),
(r'/web2pyref/default/user(?P<any>.*)',r'/user\g<any>'),
(r'/web2pyref/home(?P<any>.*)',r'/home\g<any>'),
(r'/web2pyref/pages/edit_page(?P<any>.*)',r'/edit_page\g<any>'),
(r'.*https?://www.web2pyref.com.* /web2pyref/pages/show_page(?P<any>.*)', r'\g<any>'),
(r'/web2pyref/events/edit_event(?P<any>.*)',r'/edit_event/\g<any>'),
#Examples and Refs
(r'.*https?://www.web2pyref.com.* /web2pyref/references/show_reference(?P<any>.*)', r'/reference\g<any>'),
(r'.*https?://www.web2pyref.com.* /web2pyref/examples/show_example(?P<any>.*)', r'/example\g<any>'),
(r'.*https?://www.web2pyref.com.* /web2pyref/plugin_tagging(?P<any>.*)', r'/web2pyref/plugin_tagging\g<any>'),
(r'/web2pyref/plugin_tagging/(?P<any>.*)',r'/web2pyref/plugin_tagging/\g<any>'),
('/$anything', '/$anything'),
)
routes_onerror = [
(r'*/404', r'/web2pyref/static/404.html')
]
|