method for addresses masking

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Please help me, I can't solve this problem:

I have domain:
(and other site files like etc.)
At this address there is an template site for many users. Personal site
is identified by userid.

I want to do short subdomain for all users like this:
but this short address should call main domain (with masking long
address): -->

I tried to do it by .htaccess file (mod_rewrite) with no results, maybe it
is possible to do it in application server side?

Re: method for addresses masking

you should use the header() function, i think...
here is an example:

I don't know what are you specifically looking for, but you can try
something like this (without using a database):

# get userid from
$id = $_GET['userid']
switch  ($id) {
case '23':
header('Location: /');
.... }


Re: method for addresses masking

Dnia 21 Nov 2004 17:24:01 -0800, napisał(a):

Quoted text here. Click to load it

Yes, but I want to have one php code and sql base placed at
only identified and personalized by userid. It works fine but that address
is too long for users. I don't know what can I mask this long address and
hide it under short subdomain. I want to redirect to but with address masking.

In your solution, I should update this code to all subdomains when it will
be changed :(

Re: method for addresses masking

Apache rewrite is probably the best solution here. What you need is a
rewrite map that connects the domain names to the user ids, something like:    23    24
....    288

And then a rewrite rule that goes something like this:

RewriteMap    domain-map   txt: /var/domainmap
RewriteRule    .*

Obviously, all the domain names have to map to the same IP address.

Quoted text here. Click to load it

Re: method for addresses masking

Dnia Mon, 22 Nov 2004 23:55:55 -0500, Chung Leong napisał(a):

Quoted text here. Click to load it

Thanks, it maybe work, but I can't check it because I have only access to
..htaccess file :(

Site Timeline