NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page .htaccess and domains

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
5 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 12-30-2007, 10:17 AM THREAD STARTER               #1 (permalink)
NamePros Regular
Join Date: Oct 2005
Location: Midlands, England
Posts: 343
.:Mammoth261:. will become famous soon enough.:Mammoth261:. will become famous soon enough
 



.htaccess and domains


Ok, I've searched and searched all over google for this. I'm not very good with apache and such. Basically I want a set of subsites running off one script. So for example my main domain is example1.com where the main script is running and i want example2.com to point to example1.com?site=example2 where the PHP script im running would grab all the site settings etxc. I would also like to be able to have the same thing for subdomains ie. example3.example1.com would point to example1.com?site=example3. Whilst thats happening i would like to be able to use all my current HTTP GET VARS as normal.
????: NamePros.com http://www.namepros.com/programming/412433-htaccess-and-domains.html

Sorry if this seems a little muddled - i tried to give a brief explanation of how i would like the site to operate but i don't really know much about htaccess only know various little bits. Thanks.
.:Mammoth261:. is offline  
Old 12-30-2007, 10:47 AM   #2 (permalink)
Resistance is Futile
 
Kadenz's Avatar
Join Date: Apr 2006
Location: Montreal, Canada
Posts: 1,094
Kadenz is a name known to allKadenz is a name known to allKadenz is a name known to allKadenz is a name known to allKadenz is a name known to allKadenz is a name known to all
 



Wildlife Lou Gehrig's Disease (ALS)
I think I know what you're doing. You can create a simple PHP script within the index of each of those domains.

example2.com would have:
PHP Code:
header("Location: http://www.example1.com/?site=example2"); 
in the index.php

example3.example1.com would have:
PHP Code:
header("Location: http://www.example1.com/?site=example3"); 
????: NamePros.com http://www.namepros.com/showthread.php?t=412433
in the index.php
__________________
Freelance Web Developer
PHP, MySQL, XHTML, CSS, Javascript, jQuery, Wordpress
Portfolio: www.bundy.ca
Kadenz is offline  
Old 12-30-2007, 11:06 AM THREAD STARTER               #3 (permalink)
NamePros Regular
Join Date: Oct 2005
Location: Midlands, England
Posts: 343
.:Mammoth261:. will become famous soon enough.:Mammoth261:. will become famous soon enough
 



Yea thats the sort of thing I'm trying to achieve but I was trying to minimise files such as that. Which is why I thought it was possible using htaccess and mod_rewrite?

Edit: If anybody has any solutions which do not require access to httpd.conf then please feel free to PM me. However as of now I have a different solution to my problem. Thank you to all who viewed, and to Borghunter for your contribution.
Last edited by .:Mammoth261:.; 12-31-2007 at 03:38 PM.
.:Mammoth261:. is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 02:26 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger