making the url to galleries shorter
arossphoto
Joined: 2002-09-05
Posts: 13 |
Posted: Thu, 2002-09-05 15:27 |
Hi everyone, I am interested in using Gallery as a portfolio feature for members of an online network I started. Ideally I would like members to be able to use their gallery to promote themselves on their business cards, etc. It's difficult to fit long URLs on biz cards, so I was wondering if there was anyway to customize Gallery so the URL is something like this: http://www.oursite.com/membername instead of this: http://www.oursite.com/gallery/membername It's a small thing, but it would look better on a biz card without the /gallery/ Any ideas? Thanks, Andrew |
|
Posts: 487
Well, you could try brushing up on apache's mod_rewrite :wink:
I have no idea how to use it myself, but thats the kind of thing
it's there for from my understanding.
Posts: 20
If you use mod_rewrite then you will want to do something like this...
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^/membername(.*) /gallery/membername$1 [L]
</IfModule>
The only problem you will have is that you will need a new rule for each member. If you are a nerd then you can write an external rewrite program. This will let you get a list of members from a flatfile/database/ldap or whatever to use in a rewrite map. That way you won't have to add a new rule to httpd.conf everytime you create a new user.
For more information go here...
http://httpd.apache.org/docs/mod/mod_rewrite.html
..and here...
http://httpd.apache.org/docs/misc/rewriteguide.html
Good luck!
Posts: 7
You could create subdomains for each member. That would make their site names something like:
johnsphotos.oursite.com
imagesbybetty.oursite.com
If you have access to your server, it's not difficult to do. If you don't, it's probably not an option. My domain host, for instance, allows only 3 sub-domain names. One of them is used for the gallery. Check with your domain host to find out what your options are. Sometimes, they'll do something out of the ordinary for you.
Posts: 3
Hi,
sorry for my bad english.
maybe we have the same problem ...
'newbie idea'
I have been thinking about work with subdomains...
so a person culd have http://test.domain.com
Is it possible to work with something like a third part script like
we can find here:
http://www.wzr.net/page.php?show=redirector
As far I can understand it allows works as http://www.cjb.net.
Is it possible?
Is it a very complicate solution for something simple?
any comment will be welcome.
thanks.