Jump to content

[SOLVED] Company listing by Page


hansman

Recommended Posts

Hello all,

 

I am developing a webpage that will have company profile pages (www.domain.com/companies/[company name]

 

I have these companies stored in my database.

 

I would like to dynamically create a .php page for each company. What is the best way to go upon this.

 

I only know how to search company using the GET method.

 

Thanks for your help

Link to comment
https://forums.phpfreaks.com/topic/144851-solved-company-listing-by-page/
Share on other sites

I would recomend more making virtual subdomains

company.domain.com instead :-)

 

You can do that using your root htaccess

 

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.domain.com
RewriteCond %{HTTP_HOST} ([^.]+)\.domain.com
RewriteRule ^(.*)$ /profile.php?cid=%1

 

And of course you just need to generate pages like profile.php?cid

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.