Re: mod_rewrite and .htaccess

by Marius Zydyk <pod(at)null.net>

 Date:  Thu, 30 Aug 2001 21:13:05 -0600
 To:  "Mark Harvey" <mark.harvey(at)bigfoot.com>,
<hwg-servers(at)hwg.org>
 In-Reply-To:  preinstalledco
  todo: View Thread, Original
I'm assuming you want the Rewrites in your .htaccess files. The immediate 
problem I see is that the server does not allow you to put Rewrites in 
.htaccess files. If you look up the RewriteRule directive in the Apache 
manual you will see headers at the top called 'Context' and 'Override'. 
This, BTW, applies to any Apache directive you want to use in an .htaccess 
file.

First, make sure Context for Rewrite allows .htaccess (probably does). 
Second, the AllowOverride value must be allowed for your virtual server. 
You can check this by looking at the top server httpd.conf file. Just 
search for AllowOverride, it will be apparent very quickly which one 
applies to your server. The default config has 'AllowOverride none', which 
basically means your .htaccess files don't do anything, just return server 
errors. You will need to find which Override value needs to be put in there 
(for example, I know to be able to use the Deny filters you need to enable 
the Limit override), add it to the most relevant AllowOverride (which has a 
directory context and can go inside VirtualHost tags).

At 20:30 08/30/2001 +0100, Mark Harvey wrote:
>Hi,
>
>Can anyone help me with .htaccess and mod_rewrite on Apache?
>
>I'm trying to use mod_rewrite to intercept calls for pages with .htm or
>.html and serve a .php page instead.  I don't want to just change the page
>names because of the search engines and any users who have bookmarked the
>page.
>
>I have followed the example in the Apache manual and while it works ok in
>the root html directory on my Mandrake 8.0 test box, subdirectories cannot
>be accessed and if I upload it to the server, NO pages are served up just
>blocked/bad gateway.
>
>My .htaccess file correctly handles error 404 to a custom page.
>
>Please - I'm tearing my hair out! (and I didn't have much left before!)
>
>Many thanks in advance,
>
>Mark Harvey
>--
>For information on Newquay and it's surrounding area,
>http://www.Newquay-Plus.co.uk

--
   Marius Zydyk -- pod(at)null.net -- http://www.domainofdarkness.com/

HWG: hwg-servers mailing list archives, maintained by Webmasters @ IWA