You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Sam Sherlock <sa...@gmail.com> on 2010/11/11 17:48:21 UTC

[users@httpd] apache 2.2 mod rewrite/htaccess on windows 7

I have set up php, mysql and apache 2.2

but I can't seem to get mod_rewrites to work

things that worked fine on xp and also linux just don't work on windows 7
wordpress and cakephp rewrites

but have also tried a simple test as follows

RewriteEngine on
RewriteRule bob.html alice.html

I have a single html file named alice.html abd an index.html file which
links to
bob.html and alice.html

only the alice.html link works the other is error 404

I get this in access log for bob
127.0.0.1 - - [11/Nov/2010:16:33:41 +0000] "GET /mtest/bob.html HTTP/1.1"
404 212

and in error log

[Thu Nov 11 16:29:42 2010] [error] [client 127.0.0.1] File does not exist:
C:/www/htdocs/mtest/bob.html, referer: http://ss33/mtest/

would greatly appreciate any ideas to resolve this

thx  - S

Re: [users@httpd] apache 2.2 mod rewrite/htaccess on windows 7

Posted by Sam Sherlock <sa...@gmail.com>.
Thanks Joost

I had it working before reading you reply minor change to the rule and
removing some stuff from conf - Options All seemed to help

cakephp & wordpress are also now rewriting

I will be reading up on rewritelog and rewriteloglevel
its useful to have friendly tools to assist when things go wierd

 - S



On 11 November 2010 17:11, Joost de Heer <jo...@sanguis.xs4all.nl> wrote:

> On 11/11/2010 05:48 PM, Sam Sherlock wrote:
>
>> I have set up php, mysql and apache 2.2
>>
>> but I can't seem to get mod_rewrites to work
>>
>
>  would greatly appreciate any ideas to resolve this
>>
>
> RewriteLog and RewriteLogLevel are your friends.
>
>
> > RewriteEngine on
> > RewriteRule bob.html alice.html
>
> If this is in the main config, then this will never get matched, since the
> main config will use full pathnames (i.e. /bob.html if the URL is
> http://localhost/bob.html).
>
> Joost
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>  "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] apache 2.2 mod rewrite/htaccess on windows 7

Posted by Eric Covener <co...@gmail.com>.
>> RewriteEngine on
>> RewriteRule bob.html alice.html
>
> If this is in the main config, then this will never get matched, since the
> main config will use full pathnames (i.e. /bob.html if the URL is
> http://localhost/bob.html).

it would still match since it's not anchored, but it would normally
result in a 400.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache 2.2 mod rewrite/htaccess on windows 7

Posted by Joost de Heer <jo...@sanguis.xs4all.nl>.
On 11/11/2010 05:48 PM, Sam Sherlock wrote:
> I have set up php, mysql and apache 2.2
>
> but I can't seem to get mod_rewrites to work

> would greatly appreciate any ideas to resolve this

RewriteLog and RewriteLogLevel are your friends.

 > RewriteEngine on
 > RewriteRule bob.html alice.html

If this is in the main config, then this will never get matched, since the main 
config will use full pathnames (i.e. /bob.html if the URL is 
http://localhost/bob.html).

Joost

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org