.htaccess to create dynamic subdomain from subfolder -


I wonder how a dynamic subdomain can point to the root folder when the user searches for it. Like apples.domain.com, pointing to domain.com/apples (apple folder is already manually created), then if the apple folder does not exist, it receives 404. Please help, I am a Noah with this topic.

Try:

  rewrite on the rewriting engine %% {HTTP_HOST }! ^ Www. [NC] RevokedContact% {HTTP_HOST} ^ ([^.] +) \. Domain \ .com $ [NC] REVIRCURD% {DOCUMENT_ROOT} /% 1! -D reveritium ^ - [L, R = 404] referenced% {HTTP_HOST}! ^ Www. [NC] RevokedContact% {HTTP_HOST} ^ ([^.] +) \. Domain \ com [nc] rewrite code% {DOCUMENT_ROOT} /% 1-D recriminator% {DOCUMENT_ROOT} /% 1% {REQUEST_FILENAME} -f [or] Rewrite% {DOCUMENT_ROOT} /% 1% {REQUEST_FILENAME} -d Revert Raul ^ (. *) $ /% 1 / $ 1 [L]   

The document root of domain.com in the htaccess file.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -