• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

vhost.conf does not work

T

thijsh

Guest
I tried with a simple RewriteRule if my Mod_rewrite is working but the following
http://www.mydomain.be/silly.html
is not showing
http://www.mydomain.be/existing_page.html

In the following file
/home/httpd/vhosts/gd.be/conf/vhost.conf
is written:

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^silly\.html$ /existing_page.html [L]
</IfModule>

I also did:
/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=gd.be
and
service httpd restart

Is there something wrong with my RewriteRule or is something else wrong?

Thanks in advance
 
You should study the Apache mod_rewrite docs more. The solution is:
Code:
[b]RewriteRule  ^/silly.html$  /existing_page.html  [L][/b]
Remember to restart the apache service.

You do not have to run the websrvmng everytime, just after the first time the vhost.conf file is created. Restarting the apache service is required so it will re-read and reload the vhost.conf rules.
 
Back
Top