Hi megashape,
Have you checked if your Apache server has mod_rewrite loaded? This needs to be loaded in the apache2,conf. Typically in Debian based distributions in root->etc->apache2->mods-enabled you need a rewrite.load like
Code:
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
. If you have this in there or in your main apache2.conf file and apache starts without errors then it should be loaded.
As you are using php you can also create a php page that has only:
Code:
<?php
phpinfo();
?>
or somewhere in one of the pages that you are trying to have a redirect to occur use:
Code:
<?php
print_r(get_loaded_extensions());
?>
Steve

Originally Posted by
megashape
Code:
RewriteEngine on
RewriteRule ^index.html$ index.php
RewriteRule ^realisations.html$ realisations.php
RewriteRule ^roofing-services-montreal/roofing.html$ roofing.php
I'm new to mod_rewrite, and it's either my server doesn't support the module or I'm doing something wrong.
Should the code above work properly if uploaded to
www.website.com/.htaccess ?
Basically I'm trying to change specific .php pages to .html, and give some pages a fake sub-directory extension, will this work?
Thank you very much in advance.
Bookmarks