Kevin, thanks for the response. Part of my problem is that the standard
configuration of BQ doesn't allow RewriteEngine, RewriteCond or RewriteRule
commands to be in .htaccess files in the web document root. I tried editing
httpd.conf to set AllowOverride to be All (and restarting httpd) to see if
this would clear it up, but I kept getting the same error.
I tried adding just the command you sent after the RewriteEngine On command
in the httpd.conf file for the virtual site but it didn't even recognize it.
Here is what I am trying to accomplish:
I am working with the Mambo CMS system. A number of clients have requested
it. It works fine in it's standard configuration. It has an option that
allows you to specify a "Search Engine Friendly" option, where instead of
creating page requests that consists of long query strings that look like
this:
http://www.uhostme.com/index.php?option=com_content&task=view&id=85&Itemid=1
it creates one that looks like this:
http://www.uhostme.com/content/view/85/1/
The Mambo index.php parses the URL and assigns the directory "content" as
the 'option', the directory "view" as 'task', the directory "85" as 'id' and
the directory "1" as 'Itemid'. This is clever use of redirecting what is
essentially an erroneous URL into a usable URL to be search engine
"friendly".
So they do it with the .htaccess file:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php
However, I am having a difficult time figuring out how to incorporate this
into BQ without upsetting the rules BQ has established for safe operation of
Apache. Hell, I couldn't even get it working by upsetting the BQ rules.
;-)
-----Original Message-----
From: Kevin Bonner [mailto:keb (at mark) pa.net]
Sent: Friday, April 14, 2006 5:09 PM
To: coba-e (at mark) bluequartz.org
Subject: [coba-e:04673] Re: RewriteEngine
On Friday 14 April 2006 16:33, Darrell D. Mobley wrote:
> I am attempting to drop an .htaccess file in my web document root
directory
> with the following in it:
>
> RewriteEngine On
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule ^(.*) index.php
>
> When I do, I get a 500 server error. I tried commenting out each line to
> see where the error was being generated, and when RewriteEngine On is
> enabled, it fails. Is there something I need to configure in order to be
> able to run this .htaccess file?
When you want to use one rule when matching on more than 1 condition, you
need
to use flags to chain the RewriteCond rules. The following should be what
you want:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php
Kevin Bonner