Jump to content

Recommended Posts

Posted

I think this problem has a simple solution but I'm at a loss to find it.

 

On my site I want to launch now that its ready, I have a subdomain that points to a directory on the site that has its own application. Its essentiallya sub-site that will be effectively separate from my main site I'll be launching later.

 

Problem is this. If I type in the subdomain, it takes me right in. However, it changes the url to be the full path name of the domain www.thetechgurus.net/....

 

How can I make it so that the site URL will only show as the format http://subdomain.thetechgurus.net/folder/folder2/.

 

I don't want it to appear as http://www.thetechgurus.net/folder/folder2/.

 

 

Second problem, which is actually more important.

If I type http://www.thetechgurus.net/folder/folder2, the site will load properly. However, if I do http://www.thetechgurus.net/folder/, I see the directories instead of a webpage. This is a security risk and I do not want any users to be able to see this directory since its not supposed to be a valid url path.

What I've tried so far was to setup a permanent redirect so that if the url http://www.thetechgurus.net/folder/ were entered, it would redirect that url to the url of the actual path, http://www.thetechgurus.net/folder/folder2/.

However, if I do that I get warnings that I have reached the maximum number of redirects and a cookie warning, and I am not able to access the subsite.

I have to remove that redirect in order to be able to access the subsite. What is the best way to make that middle directory inaccessible and automatically just go to the full path?

Posted

Ok, that worked great. Anyone have any ideas on the first idea? I'd like to have my subdomain appear as the primary url, not the original domain.

Thanks.

Posted

I did it through the subdomain control panel in cpanel.

 

I created the subdomain nycpics.thetechgurus.net. I set the redirection to go to first http://www.thetechgurus.net/nycpics/gallery. I just changed it to redirect to http://nycpics.thetechgurus.net/nycpics/gallery but it does the same thing.

 

If I type http://nycpics.thetechgurus.net it redirects to http://www.thetechgurus.net/nycpics/gallery.

 

Not sure there's any other way I could be doing this.

Posted

Hi,

 

I just had a quick look, and you had in incorrect redirect.

 

YOu were redirecting to h**p://nycpics.thetechgurus.net/nypics/gallery but it should be redirected to h**p://nycpics.thetechgurus.net/gallery

 

My only other question would be why you have the nypics directory if you want to redirect everything into gallery? why not put the gallery files directly in the nypics folder.

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...