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

Asked

Viewed 101 times

0

How can I do this with .htaccess?

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

  • you cannot create a folder called lojas-virtuais and move your wordpress into it?

1 answer

1


Basically you can do this with apache mod_write.

http://httpd.apache.org/docs/2.4/rewrite/remapping.html

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

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

RewriteRule Pattern Substitution

Pattern is regular expression.

With rewrite Rule...

In his example...

RewriteRule ^/(.*) lojas-virtuais$1

Browser other questions tagged

You are not signed in. Login or sign up in order to post.