View Full Version : directory structure

10-19-2004, 03:57 PM
i read this article http://www.seochat.com/c/a/Search-Engine-Optimization-Help/Utilize-Directories-for-Increased-Hits/ and would like to implement the directory structure on one of my sites...www.texascontractorratings.com.

for instance, i'd like http://www.texascontractorratings.com/find-contractor2.html?contractor_id=2 to be something like www.texascontractorratings.com/contractors/legroshomeinspections. any ideas/hints on how to accomplish this?

thanks in advance,

10-20-2004, 03:43 AM
i may be wrong but one of teh ways you can achieve this
example www.yoursite.com/section1/item
redirecting to www.yoursite.com/section.php?item=3 etc

is by using the mod_url_rewrite directive.

edit your httpd.conf file and turn the mod_rewrite engine on

then create a .htaccess file with the following lines
RewriteEngine On
RewriteRule ^(http://www.yourdomain.com)/([a-zA-Z0-9_]*)/$1/?$2/yourscript.php?itemid=$3
and upload it to your base directory

so if you typed in www.yourdomain.com/sectionname/itemnumber to would redirect to the script which displays the data ( yourscript.php ) using the variable (itemid)

i maybe wrong though

hope it helps or points you in the right direction