[Solved] Need to use the + sign in the url

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
Masweb
Forum Members
Forum Members
Posts: 173
Joined: Sat May 09, 2009 4:26 pm

[Solved] Need to use the + sign in the url

Post 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?
Last edited by Masweb on Tue Nov 18, 2014 10:57 am, edited 1 time in total.
psy
Power Poster
Power Poster
Posts: 463
Joined: Sat Jan 22, 2005 11:19 am

Re: Need to use the + sign in the url

Post by psy »

Have you tried using + instead of + ?
Masweb
Forum Members
Forum Members
Posts: 173
Joined: Sat May 09, 2009 4:26 pm

Re: Need to use the + sign in the url

Post by Masweb »

psy wrote:Have you tried using + instead of + ?
Yes I did, but that doesn't work.
psy
Power Poster
Power Poster
Posts: 463
Joined: Sat Jan 22, 2005 11:19 am

Re: Need to use the + sign in the url

Post 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. :)
Masweb
Forum Members
Forum Members
Posts: 173
Joined: Sat May 09, 2009 4:26 pm

Re: Need to use the + sign in the url

Post 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!
Post Reply

Return to “The Lounge”