You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ross Noonan <ro...@gmail.com> on 2010/07/17 19:10:44 UTC

[users@httpd] mod_rewrite gives 404

Hi,

I have recently got a new pc and have installed php/mysql and apache.
Everything works fine except for the mod_rewrite. I have uncommented the
"LoadModule rewrite_module modules/mod_rewrite.so" and added this:

<Directory "C:/htdocs">
   #
   # Possible values for the Options directive are "None", "All",
   # or any combination of:
   #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI
MultiViews
   #
   # Note that "MultiViews" must be named *explicitly* --- "Options All"
   # doesn't give it to you.
   #
   # The Options directive is both complicated and important.  Please see
   # http://httpd.apache.org/docs/2.2/mod/core.html#options
   # for more information.
   #
   Options Indexes FollowSymLinks Includes ExecCGI

   #
   # AllowOverride controls what directives may be placed in .htaccess
files.
   # It can be "All", "None", or any combination of the keywords:
   #   Options FileInfo AuthConfig Limit
   #
   AllowOverride All

   #
   # Controls who can get stuff from this server.
   #
   Order allow,deny
   Allow from all

</Directory>

and my .htaccess looks like this:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ /competition/index.php [L,QSA]


I used this .htaccess on my old machine without trouble but it doesn't seem
to be budging here.

The last messages from the log files are:

Access Log:
127.0.0.1 - - [17/Jul/2010:17:53:50 +0100] "GET /competition/login HTTP/1.1"
404 215

Error Log:
[Sat Jul 17 17:30:13 2010] [warn] module php5_module is already loaded,
skipping
[Sat Jul 17 17:30:13 2010] [notice] Digest: generating secret for digest
authentication ...
[Sat Jul 17 17:30:13 2010] [notice] Digest: done
[Sat Jul 17 17:30:13 2010] [notice] Apache/2.2.15 (Win32) DAV/2
mod_ssl/2.2.15 OpenSSL/0.9.8m PHP/5.3.2 configured -- resuming normal
operations
[Sat Jul 17 17:30:13 2010] [notice] Server built: Mar  4 2010 11:27:46
[Sat Jul 17 17:30:13 2010] [notice] Parent: Created child process 2020
[Sat Jul 17 17:30:13 2010] [warn] module php5_module is already loaded,
skipping
[Sat Jul 17 17:30:14 2010] [warn] Init: Session Cache is not configured
[hint: SSLSessionCache]
[Sat Jul 17 17:30:14 2010] [warn] module php5_module is already loaded,
skipping
[Sat Jul 17 17:30:14 2010] [notice] Digest: generating secret for digest
authentication ...
[Sat Jul 17 17:30:14 2010] [notice] Digest: done
[Sat Jul 17 17:30:14 2010] [notice] Child 2020: Child process is running
[Sat Jul 17 17:30:14 2010] [notice] Child 2020: Acquired the start mutex.
[Sat Jul 17 17:30:14 2010] [notice] Child 2020: Starting 64 worker threads.
[Sat Jul 17 17:30:14 2010] [notice] Child 2020: Starting thread to listen on
port 80.
[Sat Jul 17 17:30:41 2010] [error] [client 127.0.0.1] File does not exist:
C:/htdocs/competition/login
[Sat Jul 17 17:53:50 2010] [error] [client 127.0.0.1] File does not exist:
C:/htdocs/competition/login

I have spent the afternoon trying to get this fixed and I really would
appreciate any advice.


Thanks,
Ross

Re: [users@httpd] mod_rewrite gives 404

Posted by Ross Noonan <ro...@gmail.com>.
Got it working - changed to Options All.


Thanks

On Sat, Jul 17, 2010 at 6:50 PM, Ross Noonan <ro...@gmail.com> wrote:

> Thanks for the reply.
>
> Yes I am on windows 7 and I have not started my editor as admin but the
> module is loaded in my php info which would indicate that my changes are
> taking effect??
>
> "Does garbage in your .htaccess trigger a 500 error?" Sorry for my
> ignorance but what do you mean here?
>
>
> On Sat, Jul 17, 2010 at 6:31 PM, Eric Covener <co...@gmail.com> wrote:
>
>> > [Sat Jul 17 17:53:50 2010] [error] [client 127.0.0.1] File does not
>> exist:
>> > C:/htdocs/competition/login
>>
>> Are you on windows7 and editing a httpd.conf installed into Program
>> Files w/o starting your editor as admin?
>>
>> Does garbage in your .htaccess trigger a 500 error?
>>
>> --
>> Eric Covener
>> covener@gmail.com
>>
>> ---------------------------------------------------------------------
>> 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] mod_rewrite gives 404

Posted by Ross Noonan <ro...@gmail.com>.
Thanks for the reply.

Yes I am on windows 7 and I have not started my editor as admin but the
module is loaded in my php info which would indicate that my changes are
taking effect??

"Does garbage in your .htaccess trigger a 500 error?" Sorry for my ignorance
but what do you mean here?

On Sat, Jul 17, 2010 at 6:31 PM, Eric Covener <co...@gmail.com> wrote:

> > [Sat Jul 17 17:53:50 2010] [error] [client 127.0.0.1] File does not
> exist:
> > C:/htdocs/competition/login
>
> Are you on windows7 and editing a httpd.conf installed into Program
> Files w/o starting your editor as admin?
>
> Does garbage in your .htaccess trigger a 500 error?
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> 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] mod_rewrite gives 404

Posted by Eric Covener <co...@gmail.com>.
> [Sat Jul 17 17:53:50 2010] [error] [client 127.0.0.1] File does not exist:
> C:/htdocs/competition/login

Are you on windows7 and editing a httpd.conf installed into Program
Files w/o starting your editor as admin?

Does garbage in your .htaccess trigger a 500 error?

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
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