How to redirect all urls from a subdomain to a specific url?

0

How can I do this with .htaccess ?

All pages of http://axi.axitech.com.br/ should be directed to page http://axi.axitech.com.br/lojas-virtuais

    
asked by anonymous 27.05.2015 / 17:41

1 answer

1

You can basically do this with apache's mod_write.

link

You can write directly to .htacess or to a Directory directive in the apache configuration.

On the Apache website you will find all kinds of configuration possible. One of them is with RewriteRule

RewriteRule Pattern Substitution

the pattern is even regular expression.

With rewrite rule ...

In your example ...

RewriteRule ^/(.*) lojas-virtuais$1
    
27.05.2015 / 19:43