Link to home
Start Free TrialLog in
Avatar of kadin
kadinFlag for United States of America

asked on

mod_rewrite local windows machine not working.

apache 2.4 and php 5.5 on windows local machine.

First time using mod_rewrite. I have read everything I can find. I can't get this to work. I have made setting changes in httpd.conf as I have read others have done. Nothing has worked. I am not getting any sign of life out of this. Can someone help me please. Thanks.

http://localhost/myfolder/index.php
http://localhost/myfolder/index.php?p=register

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^register/?$  index.php?p=register [NC,L]
</IfModule>

I am expecting this:
http://localhost/myfolder/register
Avatar of Trenton Knew
Trenton Knew

did you enable the module?

a2enmod rewrite from the command line

That might be linux only though...
also, check that you may have to change the AllowOverride variable from "none" to "all"

helpful link? http://www.webdevdoor.com/php/mod_rewrite-windows-apache-url-rewriting/
Avatar of kadin

ASKER

Thanks for your response.
Your first suggestion. I do not know how to do. By command line I guess you mean cmd.exe.
I tried everything in your second post. I saw no change in behavior. Still don't work.

I am using apache 2.4 not 2.2. Maybe that is the problem. Maybe I should install an older version. I don't know if an older version will work with php 5.5 though.
Avatar of kadin

ASKER

My directory looks like this:

apache24 folder
      htdocs folder
            mysite folder
                  includes folder
                  modules folder
                  .htaccess
                  index.php
ASKER CERTIFIED SOLUTION
Avatar of kadin
kadin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kadin

ASKER

I give thanks to the one person who attempted to help me.