Redirect question / htaccess?

Hi all,

I have an odd question, and wonder if anyone can help (Atropos?). Seems like the staff are having a pretty bad week, so I don’t really want to bother them with this right now.

I’m setting up a bunch of ftp users on my site with their own webspace. I initially just created a subfolder for each ( and then used Redirect SubDir to have that address draw from the individual ftp account. Should be simple. Only thing is, Redirect SubDir won’t let me redirect to a root user folder–has to be a sub ( which is a longer address than I’d like.

So my alternate choice was to create a secondary subdomain, - which lets me indicate the ftp user as primary user. Thing is, the url is still too long, and it’s just awkward–particularly because the accounts are for newbies. SO, my question is, is there another way I can make or request a redirect so that this subdomain is displayed at ? I know it’s not a big difference, but trust me, I know my users, and I would like to be able to give them this more standard format.

I’m stuck. Am I missing something? I guess what I want is to redirect to a folder, not a subdom. Or to make a subdom look like a folder for my newbie users. To make matters more difficult, I’m installing a Wordpress blog for each user, so I have to be careful about permissions.

Suggestions appreciated. Let me know if I can explain this better. Thanks,

I think you’re missing something. Everything I see in Remap Subdir says you can remap as coming from /home/ajuarez/malcs. I did a quick test and came up with a screenshot of my setup:

Another option would be to Fully Host subdomains, such as owned by user ajuarez, so that it’s a pretty clean setup.


Yeah, you’re missing something, or else your a newb as well. Good thing about being a newb is that you’re not always going to be one!

As HTTP URLs go, the url-path is the part that goes after the hostname but before the query string or fragment identifier. It is shown in bold below.

As Scott demonstrates, you can map any url-path to a particular directory. However for each FTP user, you should make sure that you specify a subdirectory. For example if the home directory is /home/ajuarez, you should make a subdirectory called “public” or “web” and map the url-path to /home/ajuarez/public. Home directories are used to store various files and directories containing user information and should not be made web-accessible.

I am not sure I understand your question though, you are talking about two different things.

A redirect is where the web site tells the browser to fetch the content from a different URL. Since the browser has to fetch the content, the address the browser shows will change. The content can be on the same web site or a different web site.

A rewrite is where the web site changes the URL and then returns the content to the browser. The browser is not told what changes were made to the URL at all, and it does not have to make another fetch. Since the browser is not going to fetch a different URL, this will only work for that same website. You cannot have re-written to - since the hostname is different, it will be a redirect, and the visitor will see that in the browser.

:cool: [color=#6600CC]Atropos[/color] |

Hi Scott,

Thanks so much for your response. You had me for a minute there, but no go.

See my screenshots:

The difference seems to be that your path is rooted in pmbc, so I’m guessing “scott” is a primary user of the pmbc account? The only path options I’m given are /home/ajuarez rather than the primary malcs path of home/malcs/ (which would only give control of their account to me anyway).

In other words, if you establish a new ftp account, does it still work for you?

And yes, is probably the easiest thing to do, but I worry that it will misrepresent members as official representatives rather than just members.

Argh. Thank you for your time,

Er, thanks Atropos, but I don’t think you read my question very carefully.


This is precisely my problem. I’m looking for a workaround that will let me skip the extra subdir, so that my newbs have a simpler address (/ajuarez instead of /ajuarez/web).

A redirect page isn’t feasible because we’re talking about multiple pages and multiple accounts.


I don’t think this is relevant.

I included your name, Atropos, because I saw a response you gave someone in a similar situation. and I wondered if a variant would work in mine.


Contact support. There’s no reason what you’re trying to do shouldn’t work.

If you want useful replies, ask smart questions.

Scott’s not a user, it’s just an arbitrary person. User ‘pmbc’ owns that directory/domain.

Looking at your screenshot, it looks like some sort of circular mapping, where you’re trying to get a subdirectory to map to itself in the domain. If is under /home/ajuarez, that’s not going to work.

Here’s a better example of a remapping:

What will (should) work is if user ‘malcs’ (or whomever, as long as it’s not ajuarez) has /home/malcs/
You create another user ‘ajuarez’ and then as user ‘malcs’ do a remap so that maps to /home/ajuarez/malcs

Now user ajuarez has ownership over their malcs directory which will show up as


Hi Scott,

I’m not quite understanding what you’re saying.

[/quote] and are under user “malcs” --that single primary account has root path home/malcs/

ajuarez is an ftp user with root /home/ajuarez. As a basic ftp account, she has no web access yet.


What do you mean “as user malcs”? That is the only way I can do anything at the control panel level, right?


I tried this once, and I’ll try it again, but from what I can see, this just created a subdirectory “malcs” on ajuarez’s ftp account. It didn’t connect to the primary malcs/ path (did you think it would?)


Why would it should up like that? It just shows up as which works, but again, I was hoping to skip the subdir…

Am I misunderstanding you??? Thanks again for your time. I appreciate it.
p.s. aren’t I supposed to be able to use html here?

It looks like you did have it at one point:


It won’t connect. You won’t see an ‘ajuarez’ directory in /home/malcs/
The server should transparently make the connection when someone visits


In the post that you mentioned I have this directive:

RedirectMatch /caravaggio$ this is what it does:

  1. Visitor types in
  2. Browser fetches
  3. Web site tells browser to visit
  4. Browser fetches

And naturally you can do the swap the URLs:

RedirectMatch /$ Visitor types in
2. Browser fetches
3. Web site tells browser to fetch
4. Browser fetches

For the first one directive, the .htaccess file would have to be in the /home/user/ directory.

For the second directive, the .htaccess file would have to be in the
/home/user/ directory.

:cool: [color=#6600CC]Atropos[/color] |

Omigod. I just went back to my test page, and it works! I hadn’t waited long enough…

I still don’t understand why though. Is the /malcs/ directory magic or what?



The server should transparently make the connection when someone visits

So, yes, the '/malcs/ folder is the magic key? That’s what I was missing? The server puts that folder on the web? Is that true for all directories?

I’ve never been so happy to be confused. You’ve really helped me out here. Now the test is to install the wordpress to… / home/ajuarez/malcs/ , correct?


Thanks for the clarification. It looks like it is an option for me at that end. I think I’ve got the problem figured out another way though. Still good for future ref.

Thank you for your time, A.

I don’t use remapping, but it would appear that the only place to install Wordpress is in /home/ajuarez/malcs, and have it owned by user ajuarez.

The config may be a bit tricky/confusing since it’s a remapped directory. Just be careful when entering paths in the configuration. The Installation Confirmation e-mail may give you directions with all this figured out for you.