Jump to content

mod_rewrite and virtual host


BJng

Recommended Posts

Hi to all,

 

my shop is actually installed on a VPS with Centos 7 on the default site of apache /var/www/html

 

I need to have a test enviroment so I would like to use the same VPS and use virtual hosts to define the two sites (test and online).

 

I use mod_rewrite with friendly url and everything works perfectly with the default configuration

If I use virtual hosts configuration mod_rewrite does not work anymore and the only working url is the homepage of both the sites (online one and test one).

 

Any suggest?

 

Thank you to all in advance

Stefano

 

 

Link to comment
Share on other sites

  • 1 year later...
On 28/1/2017 at 9:40 PM, BJng said:

Hi to all,

 

my shop is actually installed on a VPS with Centos 7 on the default site of apache /var/www/html

 

I need to have a test enviroment so I would like to use the same VPS and use virtual hosts to define the two sites (test and online).

 

I use mod_rewrite with friendly url and everything works perfectly with the default configuration

If I use virtual hosts configuration mod_rewrite does not work anymore and the only working url is the homepage of both the sites (online one and test one).

 

Any suggest?

 

Thank you to all in advance

Stefano

 

 

Hi,

after a year a tried again to improve my VPS on centos 7 with virtual hosts... but nothing. It does not work...

Can anybody help me?

Thanks to all

Stefano

<VirtualHost *:80>
        ServerName www.mydomain.it
        ServerAlias mydomain.it
        DocumentRoot /var/www/mydomain/
          RewriteEngine On
</VirtualHost>

Edited by BJng (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...