× Here you can get community support related to ReDJ.

redirect when there is a ? and a = in the url

More
9 years 6 months ago - 9 years 6 months ago #3931 by rowby
Hi

Having excellent results with rddj.

I occasionally run into an issue like thisl.....

I need to do this redirect using rddj:

OLD URL: www.foobar.edu/events?view=events
to
GOOD URL: www.foobar.edu/events/events-list?view=events

What's the best way to do that (if possible) in rddj -- dealing with "?" and "="

Environment: Apache/2.2.15 (CentOS)

Thanks

Rowby
Last edit: 9 years 6 months ago by rowby.

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

More
9 years 6 months ago #3933 by admin
Hi Rowby,
the "From URL" field is a regular expression and this means you must escape any special char like the question mark when you need it literally. So replace the ? with \? and it will work. More info here:

dev.mysql.com/doc/refman/5.1/en/regexp.html

Kind regards,
Luigi

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

More
9 years 6 months ago #3936 by rowby
Thank you Luigi,

That took care of the redirect.

Anyone following this thread with a similar issue, in my case in addition to Lugi's solution, in the FROM field I only included the link and not the full url. That was the finishing touch that made it work in my case.

Specifically: in the FROM field: /events\?view\=events
Then in the TO field: www.foobar.edu/events/events-list?view=events

That did it! I think I already did a great review of Rddj in the Joomla Extensions Directory. But I am going there now to see if I can do an update. You can do things with Rddj that are not easy or impossible to do with redirects in htaccess, such as the url in this forum question.

Best,

Rowby

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

More
9 years 6 months ago #3937 by admin
What to say... THANK YOU for appreciate it :)

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

Time to create page: 0.140 seconds