hansman Posted February 12, 2009 Share Posted February 12, 2009 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 Quote Link to comment Share on other sites More sharing options...
drisate Posted February 12, 2009 Share Posted February 12, 2009 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 Quote Link to comment Share on other sites More sharing options...
hansman Posted February 12, 2009 Author Share Posted February 12, 2009 ok so ill make them into sub-domains, however i still need to know how to make each company page a .php page. Currently i am using a GET method that blows for SEO. Quote Link to comment Share on other sites More sharing options...
drisate Posted February 12, 2009 Share Posted February 12, 2009 i just told you you don't need to create php pages. $_GET is fine when creating virtual sub domains. Page profile.php?cid=USA would be the same as USA.domain.com Quote Link to comment Share on other sites More sharing options...
hansman Posted February 12, 2009 Author Share Posted February 12, 2009 thanks Quote Link to comment Share on other sites More sharing options...
drisate Posted February 12, 2009 Share Posted February 12, 2009 np bro have fun ;-) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.