Can this even be done?

Using a single web hosting account to host multiple sites

Can this even be done?

Postby affmark » Thu Nov 13, 2008 1:53 pm

I have a site that will host information for various merchants.

Is there any possible way to allow visitors to use the url of www.mysite.com/merchant_name (and merchant_name could be a variety of names) and it would redirect to something like www.mysite.com/merchantpage.php?id= (this variable would come from the merchant_name that is entered)?

If this isn't possible, could I add each and every merchant name to .htaccess, so that it would go to the right page?

Thanks!
affmark
 
Posts: 2
Joined: Thu Nov 13, 2008 1:47 pm

Postby richardk » Fri Nov 14, 2008 12:56 pm

Yes.

Is there any possible way to allow visitors to use the url of /merchant_name (and merchant_name could be a variety of names)

Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^/]+)/?$ /the_merchant_name_is_in_$1 [QSA,L]


it would redirect to something like www.mysite.com/merchantpage.php?id= (this variable would come from the merchant_name that is entered)

FAQ: How to change a numeric ID into a name/title.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby affmark » Fri Nov 14, 2008 5:00 pm

Thank you very much!
affmark
 
Posts: 2
Joined: Thu Nov 13, 2008 1:47 pm


Return to Domain Handling

Who is online

Users browsing this forum: Google [Bot] and 22 guests

cron