Home Apache2 Redirect Virtualhost
Reply: 0

Apache2 Redirect Virtualhost

user1120
1#
user1120 Published in May 25, 2018, 11:12 am

Hy guys, i would like to know how redirect with mode_rewrite.

I Explain, i have a virtualhosts which display my website, but i would like for example all name which lookslike redirect to my main website.

"www.dev.mama" "www.dev.test" "www.dev.*" -> redirect to "www.dev.prod".

This is my vhost :

<VirtualHost *:80>
    ServerName www.dev.prod

    DocumentRoot /var/www/html/prod
    <Directory var/www/html/prod>
            Options -Indexes FollowSymLinks MultiViews
            AllowOverride All
    </Directory>
    ErrorLog /var/log/apache2/error.log
    CustomLog //var/log/apache2/access.log combined

So now i just want than it redirect to à file html "redirect.html" which contains :

<html>
<head>
    <meta http-equiv="refresh" content="5;url=http://www.dev.prod/" />
</head>
<body>
    <h1>Redirect</h1>
</body>

I don't know if i have to create an other .conf maybe redirect.conf or to my site conf.

Thanks.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.298826 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO