Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: mod_rewrite - some_word.domain.com |
|
Author |
|
koco
Joined: 18 Jul 2006 Posts: 1
|
Posted: Tue 18 Jul '06 9:22 Post subject: mod_rewrite - some_word.domain.com |
|
|
hey folks!
just found this forum. excellent. gone thru some materials, but didnt find or to say more precisely, I may have missed a potential solution. I have a php based web site + mysql databse with keywords and description and etc. What I want:
I have a site www.domain.com. Displays a categories and keywords which are queried from my mysql database. When you click at a specific word you get the resulting links from the a xml feed at www.domain.com/results.php?id=some_id. All results are derived from a xml feed. What I want is:
I click for example "Books", "Rare Books" or whatever keyword and to have these links respectively:
books.domain.com/...
collectorsbooks.domain.com/...
rarebooks.domain.com/...
Note:
... - Means the rest of the url.
That means I have links (and subdomains) keyword.domain.com that refer actually to domain.com/results.php?id=some_id.
Is mod_rewrite the thing to go with?
Example: www.doo.co.uk
I have wild card for subdomains. Actually each generated link will be prepended with keyword value. Because the subdomain actually it doesnt exist it will be redirect to the default url address DOMAIN.com, in this case www.domain.com. It doesnt change much. I just need simple php code to prepend word. is that correct?
Can you understand exactly what I want?
Please suggest solution. I saw wide variety of text on this topic. will keep looking and on track to dive into reading url rewriting as I see and understand that is the way to go...
Thanks!
koco |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
|
Back to top |
|
|
|
|
|
|