Project Details: - I have a hostgator.com account with "wildcard DNS" activated. - I need an HTACCESS, MOD REWRITE code that will create dynamic sub-domains. - The URL will need to be like this: xxx.domain.com/zzz will contain the content from www.domain.com/store/?sub=xxx&path=zzz - For example: tarponkeith.domain.com/myprofile/file.html should redirect to www.domain.com/store/?sub=tarponkeith&path=myprofile/file.html - Payment will be via paypal only. If you can complete this, please either PM me or reply to this post. Don't know where to start? Maybe some modifications of this code will do the trick: # Rewrite <subdomain>.example.com/<path> to example.com/<subdomain>/<path> # # Skip rewrite if no hostname or if subdomain is www RewriteCond %{HTTP_HOST} . RewriteCond %{HTTP_HOST} !^www\. [NC] # Extract (required) subdomain (%1), and first path element (%3), discard port number if present (%2) RewriteCond %{HTTP_HOST}<>%{REQUEST_URI} ^([^.]+)\.example\.com(:80)?<>/([^/]*) [NC] # Rewrite only when subdomain not equal to first path element (prevents mod_rewrite recursion) RewriteCond %1<>%3 !^(.*)<>\1$ [NC] # Rewrite to /subdomain/path RewriteRule ^(.*) /%1/$1 [L] PHP: This code was found at http://www.webmasterworld.com/forum92/1310.htm and was posted by jdMorgan
I've had two responses. Both look like quality submissions. If they both work, I'll send them both $10. If one works, only that person will get the $10. If neither work, then I'll be posting here again to request more submissions. Thank you, DPers...