Web Design Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignWeb Design Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 14th, 2011, 02:48 PM
mwarsame mwarsame is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2011
Posts: 3 mwarsame User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 47 m 19 sec
Reputation Power: 0
Website directory related i.e. www.website.com/directories... Help

Hi all

This is my first post and I hope you guys can help me.

Is there a way to have a directory without the folder being in the root of the website.

i.e. if I have a website and I wanted for example:

website.com/directoy1

Is there a way to accomplish this without a folder called "directory1" in the root of the server?


I hope that makes sense

Reply With Quote
  #2  
Old November 14th, 2011, 03:27 PM
requinix's Avatar
requinix requinix is offline
Still alive
Click here for more information.
 
Join Date: Mar 2007
Location: Washington, USA
Posts: 12,705 requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)  Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 5 Months 1 Week 4 Days 5 h 49 m 47 sec
Reputation Power: 8969
Send a message via AIM to requinix Send a message via MSN to requinix Send a message via Yahoo to requinix Send a message via Google Talk to requinix
Yes. Options include aliases/virtual directories and URL rewriting, depending.

Reply With Quote
  #3  
Old November 14th, 2011, 04:00 PM
mwarsame mwarsame is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2011
Posts: 3 mwarsame User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 47 m 19 sec
Reputation Power: 0
Quote:
Originally Posted by requinix
Yes. Options include aliases/virtual directories and URL rewriting, depending.


Thanks requinix.

I found this tutorial. Is this a good method?

Youtube: http://www.youtube.com/watch?v=CrK5_SX87AU

If I was to have say hunderds of folders?

Last edited by Kravvitz : November 14th, 2011 at 04:57 PM. Reason: made the URL easier to copy and paste

Reply With Quote
  #4  
Old November 14th, 2011, 06:12 PM
requinix's Avatar
requinix requinix is offline
Still alive
Click here for more information.
 
Join Date: Mar 2007
Location: Washington, USA
Posts: 12,705 requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)  Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 5 Months 1 Week 4 Days 5 h 49 m 47 sec
Reputation Power: 8969
Send a message via AIM to requinix Send a message via MSN to requinix Send a message via Yahoo to requinix Send a message via Google Talk to requinix
No, it is not. For one, Redirect doesn't do what you need it to do. Second, it wouldn't be good for dealing with many locations.

URL rewriting is the way to go. What are these /directory1 paths for?

Reply With Quote
  #5  
Old November 14th, 2011, 09:58 PM
mwarsame mwarsame is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2011
Posts: 3 mwarsame User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 47 m 19 sec
Reputation Power: 0
Basically I noticed facebook users have their names after the domain. i.e. facebook.com/name and surely they don't have millions of folders in the root of their website.

I was asked to design a Africa charity directory website in which I wanted to give the site an option to enter a city after the url. i.e.

website.com/southafrica

or

website.com/egypt

and I don't want to put all the countries and cities in the root of the website.

I'd rather keep it in root/africa/

But whenever a country or city is entered after the domain, it directs to the appropriate directory.

Reply With Quote
  #6  
Old November 14th, 2011, 11:02 PM
Catacaustic's Avatar
Catacaustic Catacaustic is offline
Code Monkey V. 0.9
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Mar 2005
Location: A Land Down Under
Posts: 1,885 Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Weeks 4 Days 14 h 47 m 3 sec
Reputation Power: 1798
I think you're getting your terminology and functionality mixed up a bit. But it can be a bit confusing.

What requinix is trying to suggest (which is the best way to do it) is to use server re-writing to mask the folder names.

This will take a URL like (this is what your users will see):

http://yoursite.com/folder1

And re-write the URL when it hits the server to go to something like (this is what the server will see and use):

http://yoursite.com/yourpage.php?folder=folder1

This will work the same for any folder. Any first-level folder will map to yourpage.php?folder=*FOLDER NAME* so you know what to put on that page.

So, you don't have hundreds of folders around the site, and you don't need to have anything special done. On *nix servers, it's mod-rewrite using the Apache .htaccess file. On Windows it's set up in IIS (I don't know Windows much so I can't comment on how it's done there).

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignWeb Design Help > Website directory related i.e. www.website.com/directories... Help

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap