21278 Posts in 5728 Topics by 2599 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 445 Views |
-
Redirect domain to specific URL

11 November 2011 at 9:15pm
I need to redirect a parked domain (www.tuinlabo-natuurlijkkunstgras.be) to redirect to a url on the main domain (tuinlabo.be/trends).
I think the general SilverStripe .htaccess ruls might be getting in the way of this happening. Any ideas?
-
Re: Redirect domain to specific URL

11 November 2011 at 10:37pm
So just to clarify, you're not actually running a SS install on the parked domain right? If not then SS really can't interfere with the redirect FROM the parked domain to the main domain. What happens when you reach tuinlabo.be/trends (if it's a SS install) might be another matter.
-
Re: Redirect domain to specific URL

11 November 2011 at 11:01pm Last edited: 11 November 2011 11:01pm
Smurkas, the domain is parked on cPanel (http://docs.cpanel.net/twiki/bin/view/AllDocumentation/CpanelDocs/ParkedDomains) So, www.tuinlabo-natuurlijkkunstgras.be and tuinlabo.be are the same server (running SS).
-
Re: Redirect domain to specific URL

11 November 2011 at 11:15pm
Oh I see. You can do a redirect of a parked domain directly in cPanel if I remember correctly. Have you tried that?
If that doesn't work you'll have to put in an extra rewrite rule that checks the domain and redirects to the right one in the SS .htaccess file. -
Re: Redirect domain to specific URL

11 November 2011 at 11:38pm
When I add the redirect in cPanel, this gets added in .htaccess (after the SilverStripe stuff):
RewriteCond %{HTTP_HOST} ^tuinlabo\-natuurlijkkunstgras\.be$ [OR]
RewriteCond %{HTTP_HOST} ^www\.tuinlabo\-natuurlijkkunstgras\.be$
RewriteRule ^/?$ "http\:\/\/tuinlabo\.be\/trends" [R=301,L]But it does no redirection.
-
Re: Redirect domain to specific URL

11 November 2011 at 11:58pm
Well that's because it's AFTER the SilverStripe stuff so it never matches. You need to put it before the SilverStripe stuff so that it's the first rule that gets tested.
-
Re: Redirect domain to specific URL

12 November 2011 at 12:00am
Yup, that was it. Thanks for the help.
-
Re: Redirect domain to specific URL

12 November 2011 at 12:04am
No prob mate, that .htaccess stuff can be really tricky.
| 445 Views | ||
|
Page:
1
|
Go to Top |


