Results 1 to 1 of 1
Thread: URL Forwarding solution
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Feb 2006
URL Forwarding problem
I'm having a bit of a difficulty, I'm offering people free URL forwarding - so if they set their DNS settings to ours and sign up with us (all for free) they could refer their domain to some other url (masked or not, up to them) - believe it or not some domain registrars still don't give that feature, and so i made this service to help those people.
Up until now, what used to happen, was I used perl to access whm and create a new account for these people - and in that account put an index file with either meta-refresh or frameset - depends on the type of forwarding they wanted.
The way I do it is I have a cron job that runs every hour and take all the new domains that need url forwarding and create them an account.
My problem is, I have over 3000 people using this service, and so my apache file is few megs big now - so whenever there's more than one domain, the time apache takes to load is slower than the time the 2nd account is being created - and so apache is loading it's config file and in the meantime the config file is being written to and apache crashes - so far I fixed it by adding a 4 minutes delay between accounts creation but this isn't really solving the problem - more like delaying it a lil lol.
What I was thinking was - making all domains but mine lead into one php file that will load the domain settings from MySQL and generate the page (meta-refresh, frameset, and url) from MySQL.
So my question is - how can I make it so all domains but mine will have the same document root and if possible - how can I make it so that I won't have to rewrite the apache configuration file everytime - u know that I could use something like
ServerName * but www.mydomain.com