NON-www to www address
-
jvdh
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 11
-
Thank you received: 0
-
-
9 years 6 months ago #3948
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.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
9 years 6 months ago - 9 years 6 months ago #3951
by admin
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: 9 years 6 months ago by admin.
The following user(s) said Thank You: jvdh, annelipp
Please Log in or Create an account to join the conversation.
-
jvdh
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 11
-
Thank you received: 0
-
-
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
Time to create page: 0.142 seconds