hi i want to remove a space from the name in my url in the php file if($kedi==1) { $kekeywordslinks .="<tr>"; } if($htmllink==on) { $link="tag-".$ewords[$i]."-0.html"; } else { $link="tags.php?a=$ewords[$i]"; } PHP: 0 = page id for the first page if the tag is only one word its ok if the tag 2 words the url contain 20% between the words and if i clicke on the page 2 the page and url becom wrong can you please help me in this and this is .htaccess code RewriteRule ^tag-(.*)-([0-9]+)\.html$ tags.php?a=$1&lng=$2&page=$3 RewriteRule ^tag-(.*)-page([0-9]+)\.html$ tags.php?a=$1&page=$2
when i use this for $ewords[$i] work with url i mean it replace space with - but when i open the url the page is wrong i think it require doing somthing in .htaccess file but i dont know what it is
Try str_replace(" ","+", $ewords[$i]); it+will+come+out+like+this.html which is fine, fingers crossed
The + sign is really just a form of urlencoding, it should not take any effect on a url, however since you posted the above question, I am guessing you tried it already, so now I'm thinking what your asking has nothing to do with your problem. Please post an example of a URL your trying to apply ewords to.
http://www.7elm3aber.com/tetag-nokia+c5-0.html eword here = nokia+c5 try to go to next page : you will find the url become http://www.7elm3aber.com/tetag-nokia you can see it your self under tables you will see 1 2 click on 2 it must be http://www.7elm3aber.com/tetag-nokia+c5-page2.html so .htaccess code i use to convert url RewriteRule ^tag-(.*)-([0-9]+)\.html$ tags.php?a=$1&lng=$2&page=$3 RewriteRule ^tag-(.*)-page([0-9]+)\.html$ tags.php?a=$1&page=$2
it show words in the url as i sent above if it is one word the url work fine like : http://www.7elm3aber.com/ptag-mobile-0.html $ewords[$i] = mobile see the pages urls its work without any problem but if it is 2 words or more it doest work only first page like http://www.7elm3aber.com/tetag-nokia+c5-0.html $ewords[$i] = nokia+c5 replacing space with + try to go to page 2 you will find url become : http://www.7elm3aber.com/tetag-nokia thats wrong it must be http://www.7elm3aber.com/tetag-nokia+c5-page2.html so the wrong is from .htaccess file somthing is missing
i did that str_replace(" ", "%20", $url); replacing it with %20 and - and + and _ all the same problem in page 2