![]() |
Help with a mod_rewrite
What do I need to setup within my .htaccess so that *1.domain.com shows the content of domain.com/sites/*1/ without redirecting? Please note, *1 means any possible combination, would redirect to that combinations subdomain..
Some examples: http://test.domain.com/ = http://domain.com/sites/test/ http://new.domain.com/ = http://domain.com/sites/new/ |
|
This is going to be for a free website generator.. meaning they type in the subdomain they want, and then a cms system is copied into that select folder, and then they have free hosting..
So I don't know what you're talking about.. but it has nothing to do with more than one machine.. |
hmm not sure m8, you could i suppose use htaccess to do it, but wouldnt you have to change the dns entries? otherwise its not going to resolve an address? sorry m8 i dunno, i know jack about apache and the mod_rewrite engine.
|
Code:
RewriteRule http://(.*)\.domain\.com http://domain.com/site/$1 |
you mean something like this?
Quote:
|
It doesn't seem to work..
http://test.clanassist.com/ http://www.clanassist.com/sites/test I did replace `domain` with clanassist... so I dont think that's the issue.. any other recommendations..? |
as i said i think its a dns issue
|
Quote:
Code:
Options +FollowSymLinks sites folder and ( for example ) a test folder in your domain, ( add an index.html if you want to see something )cheers |
Quote:
|
You could do a Wildcard DNS, which allows for this easily.
|
that was exaclty what my thoughts where, let us know how you get on :)
|
Alright.. so your code worked.. but one slight problem..
test.clanassist.com/README.txt That won't show the file that it should.. or any of the files don't show.. So is there any way to make it so the files DO show? Such as.. Images won't link the way that it's set up, and people can't view pages :(.. So.. any help for having the previous part of the URL resolve as well? Edit: And by the way, this does require a DNS Entry * | 14400 | IN | A | 74.52.***.*** That's what I put.. by my IP still shows.. just not going to post it here. |
| All times are GMT. The time now is 04:58 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0