I want to setup my domain like this:
Obviously I have to control “search.com” but this is just an example.
The problem is that I want to do this via a script. For example I want to generate a list of every state and place that in a cut and paste field or even a script via the shell. It takes too long to click 50 time for each state and I plan on doing this for several different keywords.
Any ideas or suggestions?
Here are some things to keep the solutions more geared to what I actually need:
- Wildcard domains will not work. I need each subdomain2.subdomain1.domain.com to point to matching directories on the file server.
wildcard makes everything point to the same directory, so everything would go to:
/home/user/search.com/ which is not what I want.
I realize that if someone hits: http://search.com/bankruptcy/tx/ it will show the files so I may need a solution to prevent that. (for now it doesn’t matter)
I’ve tried mod_rewrite but dreamhost said I had to figure it out on my own, and after several days of not understanding why I was getting 500 errors (I asked for the mod_rewrite log to see, but was told to figure it out on my own), I gave up.
This would be simple if I could use wildcards and then a script to redirect based on the domain and subdomain words. I just can’t figure that out.
So, is there a way to set this up via script or “all at once”?
- CGI parameters like : http://search.com?s1=bankruptcy&s2=tx will not work, that’s not the solution I want.
So if I can’t do a cgi parameter solution, mod_rewrite solution ( it uses .htaccess ), or a script to setup all at once, any suggestions on what I can do to get this structure setup without having to manually set each one up via the control panel?
Thank you in advance.