sub domains?

They have: 21 posts

Joined: Apr 2003

Hi folks, I wish to set up a website to advertise a number of used cars, I want to have a web address that links directly to each car without going through a home page etc. do I need an unlimited domain type of website to do this or can this be done with a standard single domain website?

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Is there a problem with having a directory for each car? i.e. usedcars.com/thiscar/ where that directory only contains the car page?

Alternatively, if you get a nice host offering unlimited subdomains, you could have thiscar.usedcars.com for each car.

I would likely choose the former because you can build on the domain name brand and use that reputation as leverage for future specific used cars that you'd sell.

druagord's picture

He has: 335 posts

Joined: May 2003

reply on apache you can configure *.yourdomain.com in bind too. so anything.yourdomain.com will work then you can use php to display a page corresponding to what was typed by checking the variable $_SERVER['HTTP_HOST']

IF , ELSE , WHILE isn't that what life is all about

They have: 93 posts

Joined: Jun 2003

Not sure if he has direct server access like that. He might need to see if his host will do it if the server is not his own.

druagord's picture

He has: 335 posts

Joined: May 2003

Yes that's right i got used to have my own server

JeevesBond's picture

He has: 3,956 posts

Joined: Jun 2002

Setting up subdomains would be a pain, the method Suzanne mentioned is the best way to do it - far more manageable.

They have: 93 posts

Joined: Jun 2003

yeah, and if your server has apache's mod_rewrite, that could actually be a script query.

IE: domain.com/car.php?id=234

could eb something like domain.com/car/234

and mod rewrite makes it the proper query, the browser, visitor, and search engine spiders are none the wiser and more engines then just google can them spider your "Dynamic" content.

[Design Alpha] -Web Services : Design,Hosting,Advertising,Software
Ask about custom pricing on hosting!!
Site Assets: [UltraGaming.com] [Blades of Warcraft]

They have: 21 posts

Joined: Apr 2003

Thanks for the advice, I am using a web building program and when I name the page www usedcars.com/ford for example my web building program adds more stuff to the web address so that when I type in www usedcars.com/ford into the address bar it fails to locate the page.

p.s. I have no idea what I'm doing.

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

usedcars.com/ford/ <-- the forward bracket at the end tells the server this is a directory, not a file.

If you have no idea what you're doing, heh, you might want to learn a bit about file structures first.

/ is root
/directory/ is the root of that directory

BOTH would have different index.html files (or .php or .jsp et cetera, but both would have unique index files).

Pop us an url and we can probably track where you're going awry. Smiling

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.