views:

15

answers:

1

Dear all, i would like to rewrite url in virtual host.

Virtual directory : htdoc/dev/ , dev.com

syntax in .htaccess in htdoc/dev

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule test.html$ test.php [L]
</IfModule>

I am able to rewrite test.html to test.php in localhost. However, not able to do it in virtual host. What went wrong here? Please help. Thanks.

A: 

Please check that you have AllowOverride option set to All:

<VirtualHost...>
    ...
    AllowOverride All
    ...
</VirtualHost>
netme
@netme, thanks for the reply. I have tried this but when i restart apache it shows it has syntax error and saids allowoverride not allow here. May i know what happen? thanks.
benmsia
prob solved.. thx for ur tips.
benmsia