Same site in subdirectories...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
capitanobracco
Forum Newbie
Posts: 1
Joined: Thu Feb 02, 2012 12:35 pm

Same site in subdirectories...

Post by capitanobracco »

Hello, my name is Chris, I'm an Italian PHP developer working in England.

First of all thank you, this is a nice website, I often come here to read some posts.

I have a question, I hope I can explain it well and you could help me.

At work I developed a website, let's call it /mysite/

This site must have some copies, that will be the exact copies of the website, but with a contact page with differents logos and addresses for every copy. For example:
/mysite/company1/ , /mysite/company2/ ecc... Every company will have a different contact page: /mysite/company1/contact.php etc...

I was thinking to set a GET variable and then changing the url with the .htaccess: from /mysite/index.php?company=company1 to /mysite/company1.

The old developer created something like 20 subdirectories and 20 different copies of the website, all in html. I think this is a good way to do this.

Any advice?

Thanks
Eric!
DevNet Resident
Posts: 1146
Joined: Sun Jun 14, 2009 3:13 pm

Re: Same site in subdirectories...

Post by Eric! »

You want to just park domain on your host site and point it to the proper subdirectory. That way you can use completely different domain names for each site.

If you want to make subdomains (www.domain.com or development.domain.com, etc.), you can do that too and just point them to different directories.
Post Reply