× Here you can get community support related to ReDJ.

What's the best way to handle this redirect

More
10 years 1 month ago - 10 years 1 month ago #2268 by rowby
Hi

Most of the redirects I am using Redj for my site are to fix the following issue.

I am going into an article that has a badly formed url alias such as "much-too-long-url-address". And I am going to rename the alias "short-url"

But I want the old link to work and just redirect to http://mysite/short-url

In other words, if there is a link that someone currently has, for example, in an email or a link from an external site, or an internal link in my joomla site that is mysite.com/much-too-long-url-address , when they click on it, Redj takes them to http://mysite/short-url

Specifically I don't want them to get 404 error page, or one of those endless loop warnings :)

I assume I do something in the "placeholder" field -- which I assume is to create "aliases"?

Thanks for your excellent and personal support!

Rowby
Last edit: 10 years 1 month ago by rowby.

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

More
10 years 1 month ago #2269 by admin
Hi Rowby,
so you have an URL like:

mysite.com/much-too-long-url-address

And you change the alias so the URL become:

http://mysite/short-url

Now the problem is with the old non-existing URL. Just create a rule as follow:
From URL: ^/much-too-long-url-address$
To URL: http://{siteurl}/short-url
Request only: true

In the "much-too-long-url-address" you need to escape special chars like question marks, because this field is a regular expression.

If you have many articles and so many shortened URLs you could match all with a single rule, but this only if there's a criteria between all URLs.

Kind regards,
Luigi

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

Time to create page: 0.093 seconds