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
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.