How do i create virtual subdomain using htaccess?

How do I redirect a specific subdomain to a subdirectory using .htaccess?

Saeley Ewan Jnr Johnson at Quora Visit the source

Was this solution helpful to you?

Other answers

Hi, I just stumbled over your question, and as I have a similar problem, I try to answer with what I know about this topic: In your .htaccess you have to turn on the RewriteEngine to use Apaches mod_rewrite module (the module has to be loaded from your webserver). So I guess that is how your .htaccess could look like: RewriteEngine on RewriteCond %{HTTP_HOST} ?images\.mysite\.com$ RewriteRule ^(.*)$ images/$1 [NC] The NC rule means No Case. Hope this works for you.

Christian Baumgartner

I have a mobile site located under a subfolder. I want a link at the bottom that will allow the user to view the desktop version. How could I do this?

Justin Wegner

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.