activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brosskgm <br...@kingmanaz.net>
Subject rewrite/redirect
Date Tue, 16 Apr 2013 16:38:39 GMT
This is the first time I'm trying to use re-write and it might not be what I
want
but this is what I was told is the easiest to get what I'm looking for and
would not
need to even worry about the UserDir setup.

I would like to allow the visitor to use
http://www.[doaminname].com/username

and have the system look in the /home/userpages/[username directory]/
for the web directory.
http://www.[domainname].com/~username/ is how it's setup. But having people
type the ~ is way to hard.

If found serve the pages. If not give the standard 404.

If the visitor type http://www.[domainname].com/ give them the document
root.

I can only get it working one way or the other, not both with removing or
adding the /
on the RewriteCond.

[code]

RewriteEngine on
# try to find it in /home/userpages...
# ...and if found stop and be happy:
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI}/ -d
RewriteRule ^(.*) /home/userpages/$1/ [L]
# ...and if found stop and be happy:
# else go on 
RewriteRule ^ - [PT]

[/code]

Thanks
Bob





--
View this message in context: http://activemq.2283324.n4.nabble.com/rewrite-redirect-tp4665951.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message