Redirect domain/user to user.domain ONLY IF folder 'user' doesn't exist

Posted by ThatScriptGuy, 05-07-2007, 04:22 PM
Well, I thought I knew enough about my .htaccess stuff to do this, but I can't seem to work it out. What I want to do is if a user visits domain.com/folder, we check to see if the folder exists. If so, show as normal (IE domain.com/support) If a user visits domain.com/dynamicusername (dynamicusername is not a physical folder), redirect to dynamicusername.domain.com Any ideas on this one?

Posted by activelobby4u, 05-07-2007, 06:59 PM
its best you implement this using a php code.. redirect any page (anywhere in the home dir) to index.php first and then chek the condistion for the folder and redirect.

Posted by ThatScriptGuy, 05-07-2007, 07:12 PM
If I wanted/needed to do it in PHP, I would have done it. I'm looking for an .htaccess specific way to do this. (I know it's possible to do..I'm just not that savvy in the syntax yet)

Posted by ThatScriptGuy, 05-07-2007, 07:17 PM
For future references for other members, this was accomplished using the following code: Kevin

Je li Vam ovaj odgovor pomogao?

 Ispiši članak

Također pročitajte

how protection upload from members {jpg-gif-png} only ?

Posted by 3okl, 09-18-2008, 07:06 PMif member have none photo the uploader start upload anyfile...

weird disk usage shown in server

Posted by prashant1979, 09-18-2008, 08:28 AMHello, I am seeing a weird disk usage in one of my...

Cannot open database asp.net

Posted by Faiyaz, 09-22-2008, 03:02 PMCannot open database "DATABASENAME" requested by the login....

Database design question: Indexing

Posted by phoqoo, 01-15-2008, 12:38 PMFrom what I've read, indexing columns helps optimize DB...

ereg allow space? Simple for those who understand it

Posted by lexington, 09-21-2008, 10:46 PMI do not think I will ever fully understand ereg, eregi,...