For an example, if you where to search google for this phrase I can't remove + from url you end up in the address something like this /search?q=I+can't+remove+%2B+from+url. My question is, what is it that sends the +'s in between words and is it possible to remove them. Reason is, when I post a url /I cant remove its coming out as /I+cant+remove which is different right, although the page is the same. An example of usage would be say facebooks likes button. So does anybody know what I'm trying to say and if so, any ideas how to over come this ?
+ is added to represent space (to help distinguish a new word) Theirfore to remove you can do a simple str_replace replacing the + (plus) character with ' ' (space)
The + is needed to concatenate between words which commonly separate with spaces. It should only happen in the query string (browser's address bar) and translate back to spaces normally. But if some reason it always exist you can remove it with php function string_replace. I hope I didn't misunderstood your your problem.
Those are url encoding. If you visit this in your browser: http://www.google.com/search?q=lol lol Code (markup): It should interpret whitespace as %20
I was under the impression that having a +(plus) in the url was going to make a difference, to say example a facebook like button, but it turns out the + must be just ignored, however out of curiosity, how would I make it so that the + pluses don't appear in the url address bar. Is it str_replace on the value, but that doesn't show any pluses, or this is where I think it gets complicated my urls are .htaccess redirect. Options +FollowSymLinks RewriteEngine on RewriteBase / RewriteRule ^search([^/]+)_([^/]+)\.htm?$ index.php?dvd_search_type=$1&dvd_search=$2 [L] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\?dvd_search_type=([^&]+)&dvd_search=([^&]+)\ HTTP/ RewriteRule ^index\.php$ /search%1_%2\.htm? [R=301,L] Code (markup): Anyway thanks for all the replies... its not that important (now), so please don't waste too much time on this.