You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by John Clement <jo...@readingroom.com> on 2007/08/21 13:00:33 UTC
[users@httpd] .htaccess not working
Hi all,
I've taken the following .htaccess from CentOS 4.5 with Apache 2
============
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^([0-9]+) index.php?forum_id=$1&%{QUERY_STRING}
============
which works fine, however when putting it onto an old RHEL3/Apache 2
machine that we've got to use for development it just 404s and the only
log generated is:
10.10.100.43 - - [21/Aug/2007:11:48:10 +0100] "GET /help/forum/forum/1/
HTTP/1.1" 404 307 "http://www.bc.minke/help/forum/" "Mozilla/5.0
(Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.6) Gecko/20070725
Firefox/2.0.0.6"
>From documentation, google and comparing config with the CentOS machine
I believe all I need in the .conf files is
LoadModule rewrite_module modules/mod_rewrite.so (this file does exist
and I even tried restarting apache with mod_rewrite.so from the CentOS
machine, just incase it worked)
however it would seem that I'm wrong.
I've also checked permissions, which I think are ok.
CentOS 4.5
-rwxrwxr-x 1 root apache 105 Mar 16 16:54 .htaccess
-rwxrwxr-x 1 root apache 838 Mar 29 16:12 index.php
drwxrwxr-x 2 root apache 4096 Mar 20 15:39 topic
RHEL 3
-rwxrwxr-x 1 peter.davies rrweb 105 Mar 16 19:07 .htaccess
-rwxrwxr-x 1 peter.davies rrweb 838 Mar 29 17:56 index.php
drwxrwxr-x 2 peter.davies rrweb 4096 Mar 6 16:55 topic
Perhaps someone could point me in the right direction to working out
what I've missed?
Many thanks,
jc
--
John Clement | System Administrator | Reading Room Ltd
T: 020 7173 2811 | E: john.clement@readingroom.com | A: 65-66 Frith St,
Soho, London, W1D 4SN
------------------------------------------------------------------------
-------------------------
LONDON/MANCHESTER/SYDNEY/MELBOURNE/CANBERRA www.readingroom.com
<http://readingroom.com/>
Shortlisted: 2007 Fast Growth Business Awards - VC backed Business of
the Year
Shortlisted: 2007 Revolution Awards - Crimestoppers Most Wanted &
Reading Mission
Winner: 2006 NMA Effectiveness Awards - Cancer Research UK
Winner: 2006 New Statesman New Media Awards - Commission for Social Care
Inspection
Design Week UK Top Ten: 2006 - Digital Design Specialisms
Reading Room supports the world's largest orphaned and abandoned
children charity SOS Children's Villages: www.soschildren.org
<http://www.soschildren.org/>
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, re-transmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you are not
the intended recipient please notify us by telephone immediately on 020
7025 1800 or return it to us via email. Please then delete it from your
system.
Company Registration No. 3280127 (England & Wales). Registered Office
address: 77 Dean Street, London, W1D 3SH
RE: [users@httpd] .htaccess not working
Posted by John Clement <jo...@readingroom.com>.
> -----Original Message-----
> From: Vincent Bray [mailto:noodlet@gmail.com]
> Sent: 21 August 2007 12:27
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] .htaccess not working
>
> On 21/08/07, John Clement <jo...@readingroom.com> wrote:
> >
> >
> > Hi all,
> >
> > I've taken the following .htaccess from CentOS 4.5 with Apache 2
> >
> > ============
> > Options +FollowSymLinks
> >
> > RewriteEngine on
> > RewriteRule ^([0-9]+) index.php?forum_id=$1&%{QUERY_STRING}
> > ============
> >
> > which works fine, however when putting it onto an old
> RHEL3/Apache 2
> > machine that we've got to use for development it just 404s and the
> > only log generated is:
>
> [snip]
>
> Try http://wiki.apache.org/httpd/RewriteHtaccessIgnored
>
> If that doesn't help, reply here with answers to the
> questions it asks.
Thanks for that link, I went through the checks, double checking
everything as I went and found it was it was my mistake (I figured it
had to have been), I'd left the <Directory> within the virtual server as
<Directory />
instead of pointing to the same directory as the DocRoot. Its now
working as it should be.
Thanks for the nudge in the right direction!
jc
---------------------------------------------------------------------
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] .htaccess not working
Posted by Vincent Bray <no...@gmail.com>.
On 21/08/07, John Clement <jo...@readingroom.com> wrote:
>
>
> Hi all,
>
> I've taken the following .htaccess from CentOS 4.5 with Apache 2
>
> ============
> Options +FollowSymLinks
>
> RewriteEngine on
> RewriteRule ^([0-9]+) index.php?forum_id=$1&%{QUERY_STRING}
> ============
>
> which works fine, however when putting it onto an old RHEL3/Apache 2 machine
> that we've got to use for development it just 404s and the only log
> generated is:
[snip]
Try http://wiki.apache.org/httpd/RewriteHtaccessIgnored
If that doesn't help, reply here with answers to the questions it asks.
--
noodl
---------------------------------------------------------------------
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