I have been working all things in establishing rewrite rules in order to have shorter and better Web addresses, and I've got a very ajaxy site.

I have got rewrite rules focusing on the server, and also the pages load using the nice new web addresses, however it seems all of the ajax has become damaged. Opera informs me its a 500 error.

Attempting to load the page directly, I do not obtain a '500 Error' page, however it does return '3738', though I've no clue what this signifies.

And So I checked the apache logs, and affirmed


GET /processes/format.php?output=queries HTTP/1.1" 500 33

the issue is, i've no clue why this really is damaged. The page is available, so I am speculating it's an problem with spinning web addresses?

My rewrite rule appears like this


RewriteEngine On

    RewriteCond % !.(phphtmlcssjspresenpngjpe?g)$

    RewriteRule (.*)$ /index.php [L]

-----------------edited 1------------------ So I have got the mistake log, also it appears like the mistake is incorporated in the rewriterule not realizing

 init rewrite engine with asked for uri /processes/format.php

using pattern '(.*)$' to uri '/processes/format.php'

 RewriteCond: input='/processes/format.php' pattern='!.(phphtmlcssjspresenpngjpe?g)$' => not-matched up go through /processes/format.php 

So I am thinking it is really an error using the rewrite rule, because the !.php must have been matched up, unless of course I am reading through the log wrong.

----------------edit 2 ------------------ Appears like this might be a couple part error. Part 1 javascript is loading a 500 error Part 2 the page is not outputting this content. I have tossed a couple of echo's in to the page, and also the URL is retrievable. Unsure where that 3738 is originating from.

Some steps that can help you pin the mistake:

  • Perhaps you have attempted the format.php page without needing the js?
  • Attempt to switch on more verbose debugging around the spinning:

    RewriteLog /var/log/apache2/rewrite.log

    RewriteLogLevel 9

RewriteLogLevel 9 is very verbose, and never for use being produced

More information about rewritelog: http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html#RewriteLog

CRAZY!!! Still unsure how/why this really is happening on my small test server, and incredibly worried about the way it will progress, however the code now creates push &lifier test.

I believe the 500 error was very misleading. There wasn't a mistake, however the page wasn't coming back this content it must have.

This is what was happening.

The hyperlink I had been looking to get was format.php?output=queries

Now, with PHP, i ought to need to get the variable $_GET['output'], however i make use of the same page being an include, and so i make use of this


if(!isset($output))

For whatever reason on my small test server output had been set, even if the page has been retrieved inside a new window. How's that possible? It's only within the URL, so how exactly does PHP understand how to assign it?

Anyway, I understand the page that utilizes format.php includes a variable which i avoid using elsewhere, and so i check for your variable now. Problem fixed.

After I did that, the page loads, and firebug shows nothing. Now you ask , now, why did Firebug interpret a near empty page like a 500 error?