× Here you can get community support related to ReDJ.

Help with redirecting URL string

  • chrisp
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 9 months ago - 10 years 9 months ago #2053 by chrisp
Help with redirecting URL string was created by chrisp
Hello to all,

I'm trying to create a URL that will catch a number of URLs and redirect them to the new category I've created, but I'm having problems.. so I'm turning to the forums once again :)

Here is what I'm trying to do:

I'd like any url with the following string in it:

www.mysite.com/news/150-Hardware/

to redirect to

www.mysite.com/site-news/hardware-news/

Can someone be kind enough to provide an example?

Many thanks!

Chris.
Last edit: 10 years 9 months ago by chrisp.

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

More
10 years 9 months ago #2055 by admin
Replied by admin on topic Help with redirecting URL string
Hi Chris,
if the destination is the same for all sources, try this rule:
From URL: ^/news/150-Hardware/
To URL: http://{siteurl}/site-news/hardware-news/
Request only: true (checked)

You can also create a dynamic destination for each source URL (e.g. if you just need to replace /news/150-Hardware/ and preserve all the rest).

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

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

  • chrisp
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 9 months ago #2057 by chrisp
Replied by chrisp on topic Help with redirecting URL string
Luigi, thanks so much for your quick reply.

Will this code:

From URL: ^/news/150-Hardware/
To URL: http://{siteurl}/hardware-news/
Request only: true (checked)


make sure that the following redirects work:

www.mysite.com/news/150-Hardware/333-hello.html
to
www.mysite.com/hardware-news/333-hello.html


Thank you.

Chris.

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

  • chrisp
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 9 months ago #2058 by chrisp
Replied by chrisp on topic Help with redirecting URL string
I must have something wrong cause the redirection in my last post is not working correctly. Any suggestions luigi ?

Thank you.

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

More
10 years 9 months ago #2060 by admin
Replied by admin on topic Help with redirecting URL string

make sure that the following redirects work:

www.mysite.com/news/150-Hardware/333-hello.html
to
www.mysite.com/hardware-news/333-hello.html


To work in this way the rule must be modified:
From URL: ^/news/150-Hardware/
To URL: http://{siteurl}/site-news/hardware-news/{pathltrim /news/150-Hardware/}
Request only: true (checked)

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

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

  • chrisp
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 9 months ago - 10 years 9 months ago #2062 by chrisp
Replied by chrisp on topic Help with redirecting URL string
Luigi,

I tried the above, but it doesn't seem to work.

There is no url redirection happening at all.

Here is what I've tried:

^/news/64-Hardware/

http://{siteurl}/hardware-news/{pathltrim /news/64-hardware/}

Request Only is checked.

Any suggestions?
Last edit: 10 years 9 months ago by chrisp.

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

Time to create page: 0.162 seconds