Michael D Price
04-18-2008, 12:13 AM
I have a client who has a script that uses mod rewrite but i his htaccess file is blank!
I looked around on the hompage of the script but couldnt find any information for it.
So i need a mod rewrite condition that will work.
Here are some pretty urls ...
http://www.goarticlego.com/category/general-news-now-1-1.html
http://www.goarticlego.com/article/the-work-from-home-internet-business-is-booming-on-the-net-3-1.html
And here are the php equivalents
http://www.goarticlego.com/category.php?cat_id=1
http://www.goarticlego.com/articles.php?art_id=3&start=1
Both category and article directories do not exist ...
However files name article and category DO exist. No extension on the file name.
Here is the content of the category file.
<?
if(isset($_GET['PATH_INFO']) or isset($_POST['PATH_INFO']))
die("Parameter error");
$MYVARS = explode("/",$PATH_INFO);
$script = $MYVARS[count($MYVARS)-1];
$arr = explode(".",$script);
$arr = explode("-",$arr[0]);
$arr = array_slice($arr,count($arr)-2,2);
$cat_id = $arr[0];
$start = $arr[1];
include "category.php";
?>
I am assuming that the mod rewrite needs to redirect to SOMETHING like this ...
can anybody help with this, or do you need more information?
/category?pathinfo=1
I looked around on the hompage of the script but couldnt find any information for it.
So i need a mod rewrite condition that will work.
Here are some pretty urls ...
http://www.goarticlego.com/category/general-news-now-1-1.html
http://www.goarticlego.com/article/the-work-from-home-internet-business-is-booming-on-the-net-3-1.html
And here are the php equivalents
http://www.goarticlego.com/category.php?cat_id=1
http://www.goarticlego.com/articles.php?art_id=3&start=1
Both category and article directories do not exist ...
However files name article and category DO exist. No extension on the file name.
Here is the content of the category file.
<?
if(isset($_GET['PATH_INFO']) or isset($_POST['PATH_INFO']))
die("Parameter error");
$MYVARS = explode("/",$PATH_INFO);
$script = $MYVARS[count($MYVARS)-1];
$arr = explode(".",$script);
$arr = explode("-",$arr[0]);
$arr = array_slice($arr,count($arr)-2,2);
$cat_id = $arr[0];
$start = $arr[1];
include "category.php";
?>
I am assuming that the mod rewrite needs to redirect to SOMETHING like this ...
can anybody help with this, or do you need more information?
/category?pathinfo=1