Jump to content

Apache Url Mapping


ashrafjp

Recommended Posts

Hi, I can see no option in Apache modules in control panel to change URL Mapping.

As you know, home directory "/" is stuffed with many items (cgibin folder, softaculous scripts, etc....). So, I see it`s safer designating another folder (such as"user/home/s" and setting site home variable to that folder instead of "user/home".

My idea is that, files, srcipts, folders created and transferred by FTP should go to that folder, so that it shall be safer to delete contents and upload newer ones without fearing of deleting other basic files by mistake.

This is possible by an Apache feature called "URL Mapping", but I can`t see it here, so, my question is:

Is this feature available here? IF yes, how to access it? If no, is there any other way to do this?

 

 

Note1: The best known solution is to change home path variable.. and I know how to do this with Apache, but this feature "URL Mapping" does not seem to be available here. Is there any another way to change home path variable, that is supported here?

 

Note2: I may set a 301 redirect that redirects "/home/user/public_html/s/index.html" to "/home/user/public_html/index.html", but I`d like to check there are no problems here. It is more familiar to redirect a home directory to another directory, and not vice-versa... Well, how about "CNAMEs"? I was creating CNAMEs to redirect longer to shorter paths (for example:mail.domain.com instead of mail.google.com/a/domain)...well, I want to verify there`s no problem using it to change paths as described above.

 

Thank you.

Link to comment
Share on other sites

We don't offer that, but if I'm understanding your goal right, there's ways to accomplish what you're doing.

 

The web root for addon domains can be changed/set when you add the domain. The root cannot be changed for the main domain.

 

Very often, people set up addon domains with their web root as /home/username/public_html/domain.tld/ Be aware though that a domain set this way would not be able to access /home/username/public_html/someotherfolder/, as to it, nothing above the domain.tld folder exists.

 

I think you can make an FTP account that uses such a folder as its root too, so you never see the stuff in the home/username/ folder or in the base public_html folder as long as you use that FTP account.

 

A 301 redirect would be fine to redirect a folder to the root.

 

Also, CNAME records cannot he used to shorten a URL, only to point a domain/subdomain to another domain (which, if hosted here, will actually cause the domain with the CNAME to show a permanent queued page).

Link to comment
Share on other sites

Thank you for your reply..

A 301 redirect looks good.

Changing Softaculous installation folder (ie: "/home/username/softaculous" instead of home folder seems to be a good idea as well (to eliminate number of folders and items in home folder), but these means re-installation of script. So, 301 redirect is the best option.

Thanks again

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...