| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: Oct 2005 Location: Midlands, England
Posts: 343
![]() ![]() | .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.
__________________ Free Zetaboards themes, graphics and modifications! |
| |
| | #2 (permalink) |
| Resistance is Futile Join Date: Apr 2006 Location: Montreal, Canada
Posts: 1,094
![]() ![]() ![]() ![]() ![]() ![]() | 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: example3.example1.com would have: PHP Code:
__________________ Freelance Web Developer PHP, MySQL, XHTML, CSS, Javascript, jQuery, Wordpress Portfolio: www.bundy.ca |
| |
| | THREAD STARTER #3 (permalink) |
| NamePros Regular Join Date: Oct 2005 Location: Midlands, England
Posts: 343
![]() ![]() | 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.
|
| |