0

Hi,

I m using first time url rewriting concept..

i m getting some errors when i used different symbols in url..
$title="sachin's best shots KKR : MI ? ";

here when i use normal text (with out any symbols) ..this is working fine..but, when i use (?,",',:)...page can not be displayed..getting error...

please check the below code...

php code @ link

index-id-<?php echo $tr_id; ?>-name-<?php echo urlencode($title); ?>.htm

.htaccess

RewriteRule index-id-(.*)-name-(.*)\.htm$ index.php?id=$1

plz tell me wat i need to do...
i m struggling 4 last couple of days...

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by sarithak
0

Hi liamfriel,


i m phasing problen only when i used ( :, ? , !, | )...these type of symbols...there is no problem when i used (', ")...

plz look into the code...
Code:

$url=urlencode($tr_topic);

<a href="index-id-<?php echo $tr_id; ?>-name-<?php echo htmlentities($url); ?>.htm"> xxxxxxxxxxx </a>

Thanks...

Google chrome error:

HTTP - 404 Page Not Found
Sorry, the page you were looking for cannot be found.

I have been reading that some browsers retain the HTML entities of encoded chars try:

htmlentities() or htmlspecialchars().

before encoding.

http://php.net/manual/en/function.urlencode.php

Edited by sarithak: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.