× Here you can get community support related to ReDJ.

Another replace part of url query

  • sitewideuk
  • Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 2 months ago #6529 by sitewideuk
Another replace part of url query was created by sitewideuk
Hi Guys,

I have had to implement a menu item id fix as discussed here

This obviously changes the url to www.mydomain.com/menu-itemid-fix/myurl - I'd like to replace 'menu-itemid-fix' with 'blog' but obviously keep the destination page the same. I have implemented the following, but am getting a 404 error page rather than the article displaying.

From URL: ^/menu-itemid-fix/
To URL: {scheme}://{siteurl}/blog/{pathltrim /menu-itemid-fix/}{queryfull}

Redirect is set to internal redirect and Request only is checked.

Is this possible? If so can you advise how I can achieve it?

Regards
D

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

More
6 years 2 months ago #6538 by admin
Replied by admin on topic Another replace part of url query
Hi D,
it is not clearwhat you need, but if you write here the redirect you need (OLD URL -> NEW URL) I will write you the rule.

Kind regards,
Luigi

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

  • sitewideuk
  • Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 2 months ago #6542 by sitewideuk
Replied by sitewideuk on topic Another replace part of url query
Hi Luigi,

Basicly I have had to create a menu item with the alias menu-itemid-fix which produces a url like www.mydomain.com/menu-itemid-fix/myurl - I want the url to be www.mydomain.com/blog/myurl - thus the menu-itemid-fix part of the url should display as blog.

I hope that makes sense?

Regards
D

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

More
6 years 1 month ago #6556 by admin
Replied by admin on topic Another replace part of url query
Hi D,
sorry for delay (I am busy with a new project). Try a rule as follow (literally):
From URL: ^/blog/myurl$
To URL: {scheme}://{siteurl}/menu-itemid-fix/myurl
Request only: true (checked)

It should redirect www.mydomain.com/blog/myurl to www.mydomain.com/menu-itemid-fix/myurl. If it works you can change the redirect type from 301 to 200 (internal, only works in Enterprise version) so the browser will stay on the first URL (the redirect happens on the server side).

Kind regards,
Luigi

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

Time to create page: 0.104 seconds