× Here you can get community support related to ReDJ.

domain redirection on every link

  • mike369hq
  • Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 10 months ago #6118 by mike369hq
domain redirection on every link was created by mike369hq
Hi!
First of all: thank you for this great extension, I was able to resolve a lot of issues with your help :)

There's one thing I can't figure out:
I've got 2 domains for the same site and I need to redirect each site to the main domain, for example:
www.domain.com > www.domain.hu
www.domain.com/sub1 > www.domain.hu/sub1
www.domain.com/sub2/something > www.domain.hu/sub2/something
So I have to change the main domain and leave the other parts as is.
Please be so kind and help me to find out the solution (if any).

Thank you in advance!

Please Log in or Create an account to join the conversation.

More
6 years 10 months ago #6121 by admin
Replied by admin on topic domain redirection on every link
This is better done with .htaccess:
RewriteEngine On
RewriteCond %{HTTP_HOST} domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.hu/$1 [R=301,L]

Kind regards,
Luigi

Please Log in or Create an account to join the conversation.

  • mike369hq
  • Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 10 months ago #6122 by mike369hq
Replied by mike369hq on topic domain redirection on every link
Hi Luigi,
Thank you for your fast help, I tried this solution, but unfortunately always falls back to the base domain instead of the link with same end (so domain.com/something leads to domain.hu).

Please Log in or Create an account to join the conversation.

More
6 years 10 months ago #6124 by admin
Replied by admin on topic domain redirection on every link
The $1 should avoid this. Can you post your config here?

Please Log in or Create an account to join the conversation.

  • mike369hq
  • Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 10 months ago #6126 by mike369hq
Replied by mike369hq on topic domain redirection on every link
There was a server-side redirect that I didn't notice, now your solution works as charm.
Thank you again for your kind help, have a nice day :)

Please Log in or Create an account to join the conversation.

More
6 years 10 months ago #6127 by admin
Replied by admin on topic domain redirection on every link
You too.
The following user(s) said Thank You: mike369hq

Please Log in or Create an account to join the conversation.

Time to create page: 0.090 seconds