This is a discussion on Gather URL From Address Bar? within the Php and MySQL forums, part of the Programming / Scripting / Coding category; Im not sure if this is in right scripting section but here goes nothing; I have got a problem, i ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| | #1 (permalink) |
| Senior Member | Im not sure if this is in right scripting section but here goes nothing; I have got a problem, i have 3 parked domains at my hosting account, i need them to "point" to different sub-directories within my hosting account. After speaking to my hosting support they say it is not possible, (Tell me if they're wrong) so i need another alternative. I was thinking of a script like this. This script would gather the URL from the address bar and then redirect to a page determinde by me. So say i went to www.flubb.com the script would gather the url and redirect to www.flubb.com/flubb. And if i went to www.jdjokes.com the script would gather the url and redirect to www.jdjokes.com/jdjokes. Hope it makes sense. Flubber EDIT: If worse comes to worse i can just have a spash page saying "What are you looking for" and then they click what the site they are looking for. But i would rather a script.
__________________ -Gary |
| | |
| | #5 (permalink) |
| WMT Addict | how about: <?php if ($_SERVER['REQUEST_URL'] == "http://domain.com") { header('Location: http://place.com/wherverv'); } else if ($_SERVER['REQUEST_URL'] == "http://domain1.com") { header('Location: http://place.com/wherverv'); } ?> And do that. I'm not great at PHP, just started, but it's a guess ;P
__________________ Better than Firefox? Try Maxthon |
| | |
| | #6 (permalink) |
| Senior Member | If you could give me the exact code where i only have to change the domains and specifics, it would make life a gawd lot easier for the fat guy. And theres some WMT? in it for you, even though you're the admin.... :s Im off to sleep check back tommorow after school. Thanks in advance Flubber. EDIT: Trying Ic3colds solution. But if you find a flaw in it before i do please tell. Thanks ic3cold!
__________________ -Gary |
| | |
| | #8 (permalink) |
| WMT Addict | oops, sorry, I thought you made a type and it was URL. Sorry, here it is all agian: PHP Code:
__________________ Better than Firefox? Try Maxthon |
| | |
| Tags |
| address, bar, gather, url |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| icon in address bar | benf | Programming / Scripting / Coding | 2 | 07-06-2005 11:43 |
| Free funny e-mail address! | Bmg | General Webmaster Discussion | 9 | 14-05-2005 19:49 |
| Logo in the Browsers Address Bar - Favicon.ico | Wistow | Website Design Articles | 0 | 19-03-2005 15:49 |