Jump to content

url rewrite help


darkfreaks

Recommended Posts

say i have the appropriate folders for categories how would i rewrite it like

 

?pg=page&cat=cat

 

right now categories arent setup but page is just using substr to get php pages with.

 

code:

<?php
//check if directory exists
if(!is_dir('touchups')||!is_dir('websites')||!is_dir('ads')){ echo "directory does not exist";}
//open directories
$adir = dir("ads");
$touchdir = dir("touchups");
$webdir = dir("websites");

//outputting all files in ad directory
while (($file = $adir->read()) !== false)
{
echo $file;	
}
//outputting all files in touchups directory
while (($file = $touchdir->read()) !== false)
{
echo $file;	
}
//outputting all files in website directory
while (($file = $webdir->read()) !== false)
{
echo $file;	
}

?>

Link to comment
https://forums.phpfreaks.com/topic/174113-url-rewrite-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.