× Here you can get community support related to ReDJ.

www and non-www issues

  • Thomas
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 10 months ago #4013 by Thomas
www and non-www issues was created by Thomas
Hello,

i have problems to redirect links from older versions of our site to the new urls, wether they are coming with or without "www".

I am trying to detect "www" with a regex like this:
(?:www\.)?

Take a look at the attachment for examples.
Am i assuming right, that the regex cannot be mixed with other string of the url?
http://(?:www\.)zrinski.de/en/Stellenboerse.html

I tried to regex the whole url string like this without success in redirection:
http\:\/\/(?:www\.)?zrinski\.de\/en\/Stellenboerse\.html

Any hints how to solve this?

Many thanks in advance,

Thomas
Attachments:

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

More
8 years 10 months ago #4014 by admin
Replied by admin on topic www and non-www issues
Hi,
it's simplest than this. Create a rule as follow:
From URL: ^https?://www\.zrinski\.de/en/Stellenboerse\.html
To URL: <your destination>
Request only: false (unchecked)

So the full URL must start with http then an optional s (with s?) and then :// and the www, that's all.

Kind regards,
Luigi
The following user(s) said Thank You: Thomas

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

  • Thomas
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 10 months ago #4015 by Thomas
Replied by Thomas on topic www and non-www issues
Hi,

thanks for the quick response.

Ok i have to escape the ".", but the initial problem ist that i try to make the "www." optional, not the http(s).

I recieved nearly 2000 errors in the past 3 months, which were all tracked by ReDj.

Most of them are dead links to several older versions of our website, which i want do redirect to their corresponding page of the actual website. Most of the old links are coming in doubled, one without and one with "www".

I have to redirect all those errors manually anyway, but would like to make only half the work with the correct regex for the optional "www." problem.

Hope that explains better what i need, because english is not my mother language.

Another question: can i export the "redj_redirects" table out of the database, edit the exisiting redirect-from-urls and re-import it to the databse?

greetings,

Thomas.

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

More
8 years 10 months ago #4016 by admin
Replied by admin on topic www and non-www issues
Hi Thomas,
just change my rule as follow:
From URL: ^https?://(www\.)?zrinski\.de/en/Stellenboerse\.html
To URL: <your destination>
Request only: false (unchecked)

It should work...

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

  • Thomas
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 10 months ago #4017 by Thomas
Replied by Thomas on topic www and non-www issues
Yes, it worked :)

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

More
8 years 10 months ago - 8 years 10 months ago #4020 by admin
Replied by admin on topic www and non-www issues
Great :)
Last edit: 8 years 10 months ago by admin.

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

Time to create page: 0.087 seconds