the module in the httpd.conf for rewrite is as follow:
LoadModule rewrite_module modules/mod_rewrite.so
path to .htaccess:
c:\wamp\www\magentodev\.htaccess
therefore in .htacess I have this:
<IfModule mod_rewrite.so>
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/boombottleh2o\+?$
RewriteRule (.*) /gu/boombottleh2o.php [NC,L,QSA]
//some other ones
</IfModule>
I expected to try:
localhost/magentodev/boombottleh2o
instead of:
localhost/magentodev/gu/boombottleh2o.php
it supposed to work because it is working on production but not localhost, I have wamp server apache and here is some configurations:
in C:\wamp\bin\apache\apache2.4.9\conf\httpd.conf:
<Directory "c:/wamp/www/">
Options Indexes FollowSymLinks
AllowOverride All
Require local
</Directory>
it is not correct as Anu is saying so I am changed the in C:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf to:
<Directory "C:/wamp/www/">
Options All
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<VirtualHost *:80>
ServerAdmin localhost
DocumentRoot C:/wamp/www/
ServerName localhost
</VirtualHost>
I could not figure out what is wrong, I appreciate any help
Have your C:/wamp/www/magentodev/.htaccess
like this:
ErrorDocument 404 default
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^boombottleh2o(/.*)?$ gu/boombottleh2o.php [NC,L]
mod_rewrite
References:I had a similar problem on my Wamp server ver 2.5 with Windows 7..
Your .htaccess file looks solid for what you're trying to accomplish, but with your vhost.conf make sure to cover all your boundaries and add a regex * at the beginning of the file
So instead of
< VirtualHost localhost:80>
You get
< VirtualHost *:80>
This eliminates localhost as you already set that as the ServerName and You can add an alias under neath
This may sound obvious but have you tried anything with the wampmanager?
Click on the Wamp Icon, then Apache, then modules and scroll down a bit and make sure the rewrite module has a check next to it. That fixed it for me!
Good Luck, Wamp is always trickier than it seems
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With