Membership is FREE, giving all registered users unlimited access to every Acorn Domains feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

htaccess help

Paullas

Staff member
Joined
Jul 13, 2004
Posts
5,817
Reaction score
361
Hi

I am hoping someone can help. Is there a way to forward a domain to a specific page depending on the URL it cam from?.

I a diverting all my domains from a parking company to my main site but when they hit my main site i want it to display the page specific for that domain name.

Thank in advance

Paul
 
Ah thanks, is there a way to wild card it?

As if i have over 500 domains my htaccess will be massive :)
 
I wouldn't do it like this as you'd have to add each domain and a rule to your htaccess unless that's what you want to do.
I'd just have an index.php that captures everything and if you have redirected the domain the info will be in the $_SERVER['HTTP_REFERER'] variable. You can then strip it down to the domain and redirect accordingly.
 
If you're forwarding the domains, cant you just forward to the exact page url you want to hit ?
 
If there is an obvious pattern then you could probably build a regex pattern or 2 to achieve the desired result in .htaccess otherwise a simple PHP redirect as Rob suggests could do the trick
 

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Premium Members

New Threads

Domain Forum Friends

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
      There are no messages in the current room.
      Top Bottom