20 Apr
Posted by admin as Directory Scripts
Some time back I did a successful mod rewrite for my directory powered by the Free PHP Directory Script (www.freephpdirectoryscript.com)
So I just though thats I should share this with other directory owners.
Now if you want those lovely .html extensions instead of those ugly urls for your pages, read on…
IMPORTANT ~ Please take a backup of all the files that you are editing
Directory Script : Biz Directory Script / Free PHP Directory Script
Add a .htaccess file with the following code
Quote:
| Options +FollowSymLinks RewriteEngine On RewriteRule ^([0-9]+)\.html$ /index.php?c=$1 [L] |
OPEN index.php
FIND
Quote:
| $replace = array(”[CATEGORY_NAME]” => $subcategories[$x][”name”], “[CATEGORY_URL]” => $dir.’index.php?c=’.$subcategories[$x][”id”]); |
Might need to be replaced in two places
REPLACE WITH
Quote:
| $replace = array(”[CATEGORY_NAME]” => $subcategories[$x][”name”], “[CATEGORY_URL]” => $dir.’’.$subcategories[$x][”id”].’.html’); |
FIND
Quote:
| $category_url = $dir.’index.php?c=’.$parent_categories[$x][”id”]; |
Might need to be replaced in two places
REPLACE WITH
Quote:
| $category_url = $dir.’’.$parent_categories[$x][”id”].’.html’; |
OPEN add_url.php
FIND
Quote:
| $category_url = $dir.’index.php?c=’.$parent_categories[$x][”id”]; |
REPLACE WITH
Quote:
| $category_url = $dir.’’.$parent_categories[$x][”id”].’.html’; |
Sorry cant provide any support….as I had someone else do that for me
Hope that helped..
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jun | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | |||
One Response
North Carolina Web Design
May 14th, 2008 at 6:28 pm
1Worked great on my directory. Great information!
RSS feed for comments on this post · TrackBack URI
Leave a reply