T
T
TANK_IST2016-08-16 17:03:36
Apache HTTP Server
TANK_IST, 2016-08-16 17:03:36

Why is RewriteEngine not working in apache?

I use this code in site-enabled

<VirtualHost *:80>
        ServerName site.net
        ServerAdmin [email protected]
        DocumentRoot /var/www/site
        ServerAlias *.site.net
        RewriteEngine On
        RewriteCond %{HTTP_HOST} !^www.site.net$
        RewriteCond %{HTTP_HOST} ^((.*)\.)site.net$
        RewriteRule ^/(.*) /%2/$1
</VirtualHost>

and on my server subdomains work fine, but on the customer's server when switching to a subdomain
Cannot access site
The DNS address of the dev.site.net server could not be found.

Any ideas why that is?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question