Log in

View Full Version : Rewrite Problems


Adrian Schneider
09-14-2006, 10:10 PM
Okay, here's the problem....

53451
When users are viewing my products pages, they randomly get error messages.

My URLs here are rewritten, here is the code
RewriteRule products/vblogetin/devnews/page([0-9]+)/ devnews.php?page=$1 [QSA]
RewriteRule products/vblogetin/devnews/ devnews.php [QSA]
RewriteRule products/([a-z]+)/([a-z]+) products.php?product=$1&document=$2 [QSA]
RewriteRule products/([a-z]+)/ products.php?product=$1 [QSA]
RewriteRule products/ products.php [QSA] In my PHP file, in order to prevent the pain in the ass of having to use the preprocess whos online hook, I did this to make the $filename variable normal: $filename = $_SERVER['SCRIPT_NAME'];
$queryString = "?$_SERVER[QUERY_STRING]";
$vbulletin->session->set('location', "$filename$queryString");
My pages have a $_GET['document'] and $_GET['product']. Basically, if a product is specified, and no document, it defaults to the product index, and if both, view that page for that doc. If neither are specified, then go to products index. If something is specified, and is invalid, display an error (like it is).

Anyway, something from the cron jobs is messing up the query string, which is causing these error messages. Any ideas? If nobody knows, I'll go back to the (messy) full paths in the WOL hooks.

As always, any help is greatly appreciated.

Adrian Schneider
09-15-2006, 10:08 PM
Meh... nevermind.

vBSEO totally destroyed this method, so it's time to do it the usual way.