Mod Rewrite Producing 404 When Crawled (works fine when viewed in browser)

sicon99

New Member
I have the following code in my .htaccess:\[code\]RewriteEngine OnRewriteBase /RewriteRule ^index\.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]\[/code\]My pretty-link converting is done on my index.php. If the user is looking for something that doesn't exist, a 404 Header is produced, otherwise content is show.That is all fine and dandy, however when a crawler or something tries to view the HTML, they are getting a 404 error.For example:http://www.jasonleodurbin.com/portfolioThat link should work fine. If you try to validate it at an HTML validator, it doesn't work. The crawler says it is getting a 404. I am getting the same for Facebook share.I've tried removing the 404 error header, and I am still getting the same problem. What is the deal? Any suggestions?EDIT:New .htaccess:\[code\]RewriteEngine OnRewriteCond %{HTTP_HOST} ^jasonleodurbin\.com$ [NC]RewriteRule ^(.*)$ http://www.jasonleodurbin.com/$1 [R=301,L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^([a-z]+)/$ index.php?go=$1&app=1 [NC,L,QSA]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^([a-z]+)?success=true index.php?go=$1&success=1 [NC,L,QSA]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^([a-z]+) index.php?go=$1 [NC,L,QSA]\[/code\]Processing:globals.php\[code\]if(!isset($_GET['go']) || $_GET['go'] == "") $_GET['go'] = "home";\[/code\]header.php\[code\]if(isset($_GET['go']) && !@fopen(strtolower($_GET['go']).".php",'r')){ //header("HTTP/1.0 404 Not Found"); define("FAIL",true); $_GET['go'] = "error";}else { define("FAIL",false);Header('HTTP/1.1 200');}if(FAIL) define("GOSUB",DIR);if(isset($_GET['app'])) define("GOSUB","../");else define("GOSUB","");\[/code\]I've also tried this for the index.php:\[code\]<?Header('HTTP/1.1 200 OK');?><? require_once("header.php");?><? require_once(strtolower($_GET['go'].".php"));?> </div></div><? if(!defined("FOOTER"))define('WP_USE_THEMES', false); define("FOOTER",true); include("blog/index.php");?><!--[if IE]><a href='http://www.google.com/chrome' title='Get Google Chrome : A Better Way To Browse' class='noie sprite-1'>IE Sucks</a><![endif]--><!--[if lt IE 7]><div style='position:absolute;top:60px;left:0px;'><b>IE 6</b>?! Dude, upgrade. <br>Click the link above to get Google Chrome.</div><![endif]--></body></html>\[/code\]Something is sending the 404 before I can even send 200.
 
Back
Top