Ajax query on php file with query string causes 404

davey_89

New Member
If you want to recreate the error go to www.tlcnz.com and click on the contact us link in the horizontal menu under the masthead. In the interests of the site not being totally non-functional I have removed the query string entirely from all the other other links and replaced them with individual files for each one - except for the link to the contact form. I do need a generic solution for some of the functionality which the menu.swf file uses. Plus it used to be nice and elegant. This all used to work...I am mystified at how I managed to break it.My Javascript is here. Here is the PHP I am using. This is bloader.php which Ajax comes back with a 404 on\[code\]<?phpheader("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past?><?PHP require_once('blog/wp-blog-header.php');?><?PHP $name = $_GET['name'];query_posts('pagename='.$name);while (have_posts()): the_post(); ?><h2><?php the_title(); ?></h2><?php the_content(''); ?><?php endwhile; ?>\[/code\]And here is about.php which works, and is exactly the same. It just doesn't take a query string.\[code\]<?PHP require_once('blog/wp-blog-header.php'); ?><?phpheader("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past?><?PHP $name = "about";query_posts('pagename='.$name);while (have_posts()): the_post(); ?><h2><?php the_title(); ?></h2><?php the_content(''); ?><?php endwhile; ?>\[/code\]
 
Back
Top