× Here you can get community support related to ReDJ.

NON-www to www address

More
8 years 10 months ago #3948 by jvdh
NON-www to www address was created by jvdh
Hello,

How can I redirect all URLs from NON-www to www with ReDJ?
I use the Latest Enterprise version.

Jeroen

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

More
8 years 10 months ago - 8 years 10 months ago #3951 by admin
Replied by admin on topic NON-www to www address
Hi Jeroen,
to do this with ReDJ create a rule as follow:
From URL: ^https?://yoursite\.com/
To URL: {scheme}://www.yoursite.com{path}{queryfull}
Request only: false (unchecked)

A little explanation. The "From URL" is a regular expression, so when the request begins with (^) http or https (s? means 0 or 1 occurrences of "s"), and after :// there is the domain name without the www. then make the redirection. The dot before com is escaped (\.com) because we need it literally.

The destination uses macros, so {scheme} preserves the current scheme (http or https), then there is the domain with the www needed, and {path}{queryfull} will preserve the remaining part of the original request.

Of course you need to change "yoursite" with the proper domain name. Please, advise.

Sincerely,
Luigi
Last edit: 8 years 10 months ago by admin.
The following user(s) said Thank You: jvdh, annelipp

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

More
8 years 10 months ago #3957 by jvdh
Replied by jvdh on topic NON-www to www address
Thank you Luigi !
Also for the explanation.

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

More
8 years 10 months ago #3959 by admin
Replied by admin on topic NON-www to www address
U're welcome.

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

Time to create page: 0.079 seconds