On my site the URLs are displayed http://example.com/?id=catagory&page=page I would like to know how to make the URL display www.example.com/catagory/page.php With catagory and page depending on where the file name is located. How my site is setup now I have all the pages in /mods directoy So /mod/catagory/page.php displays as this. http://example.com/?id=catagory&page=page I use an index file that stays constant on all pages and just the middle column changes on each page. I am using this code on the index.php to get the pages <? if (isset($_GET['page']) && isset($_GET['id']) && file_exists('mods/'.$_GET[id].'/'.$_GET[page].'.php')) { include 'mods/'.$_GET[id].'/'.$_GET[page].'.php'; } else { include "home.php"; } ?> Code (markup): Thanks for your help
Hi, in .htaccess paste this code: RewriteEngine On RewriteRule ^([a-zA-Z]+)/([a-zA-Z]+).php$ /?id=$1&page=$2 x Code (markup): where x is just ENTER - blank new line. I think this should work fine for You. Regards, M
copy all files to the webhome /mods -> / + .php so you can access all files thru /category/page or where is your problem?