redirect root folder site another subfolder (thal not is any app)

41 views
Skip to first unread message

dam...@gmail.com

unread,
Sep 4, 2013, 6:46:48 AM9/4/13
to web...@googlegroups.com

SO debian, apache2 with wsgy and mod_rewrite load

Is posible redirect to subfolder when app is not specified on url?

example:

http://www.mysite.com/ -> http://www.mysite.com/wordpress/index.php

in case
http://www.mysite.com/welcome/ (normal work, no redirect anything)

I test on /etc/apache2/sites-available/default:

WSGIDaemonProcess web2py user=www-data group=www-data

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite\.com$
RewriteRule (.*) http://www.mysite.com/$1 [R=301,L]
RewriteRule ^$ wordpress[L]

<VirtualHost *:80>
  WSGIProcessGroup web2py
  WSGIScriptAlias / /home/www-data/web2py/wsgihandler.py
...
also I test

RewriteEngine On
RewriteRule ^$ /worpress[L]


Very thanks!

--
Dani



damufo

unread,
Sep 4, 2013, 11:00:38 AM9/4/13
to web...@googlegroups.com
Hi:

this solution, work for me:

file: routes.py

add:

routes_in = (
('./', '303->http://www.domain.org/folder'),
('.', '303->http://www.domain.org/folder'),
)




En 04/09/2013 12:46, dam...@gmail.com escribiu:

SO debian, apache2 with wsgy and mod_rewrite load

Is posible redirect to subfolder when app is not specified on url?

example:

http://www.mysite.com/ -> http://www.mysite.com/wordpress/index.php

in case
http://www.mysite.com/welcome/ (normal work, no redirect anything)

I test on /etc/apache2/sites-available/default:

WSGIDaemonProcess web2py user=www-data group=www-data

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite\.com$
RewriteRule (.*) http://www.mysite.com/$1 [R=301,L]
RewriteRule ^$ wordpress[L]

<VirtualHost *:80>
ᅵ WSGIProcessGroup web2py
ᅵ WSGIScriptAlias / /home/www-data/web2py/wsgihandler.py

...
also I test

RewriteEngine On
RewriteRule ^$ /worpress[L]


Very thanks!

--
Dani



--
ᅵ
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/dtppgONOxik/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages