Page 1 of 1
[Solved] Need to use the + sign in the url
Posted: Mon Nov 17, 2014 7:06 pm
by Masweb
I'm using the function: redirect_page_301 page to redirect lots of old url's in Google.
The old website used a + sign in the url.
If I use the + sign in the url field of CMSMS I get an error because the +sign is not allowed here.
I search where I can change this but didn't found that solution.
Does anyone know how to do this?
Re: Need to use the + sign in the url
Posted: Mon Nov 17, 2014 9:04 pm
by psy
Have you tried using + instead of + ?
Re: Need to use the + sign in the url
Posted: Tue Nov 18, 2014 6:51 am
by Masweb
psy wrote:Have you tried using + instead of + ?
Yes I did, but that doesn't work.
Re: Need to use the + sign in the url
Posted: Tue Nov 18, 2014 7:35 am
by psy
I'm using the function: redirect_page_301
Not familiar with this function. Is it a smarty tag or in some module php code?
If it's a tag, you could try something like:
Code: Select all
{$tempurl=str_replace('+', '---',http://www.myoldsite.com/something+else/page.html)}
{redirect_page_301|replace:'---':'+' $tempurl}
In other words, change the + to a string that would never appear in your URL but is acceptable to CMSMS. Then when it's got past CMSMS and about to output the smarty tag content, replace the '___' with '+'}
Worth a try.

Re: Need to use the + sign in the url
Posted: Tue Nov 18, 2014 10:56 am
by Masweb
This is a function you can download from the tags on the CMSMS website.
I've used you code but don't no where to put it, so for me it didn't work.
I've made for al the links a single html page on the server and did the job this time with
Code: Select all
<meta http-equiv="refresh" content="0; url=http://www.website.com/tag/link.html
">
This is not the sollution on my question but works for me now.
Thanks for your time!