Welcome Guest, Not a member yet? Register   Sign In
Url Encoding ',' & ' '
#1

[eluser]Shimura[/eluser]
Hi,

I have a problem with my url, i recover a title in my url like that : http://www.project.fr/name_controler/nam...n/id/title.

But with my title for a blog, they are with space and the result is :

http://www.project.fr/name_controler/nam...id/welcome in my world

It's a problem with my htacess ? or with the Config ?

Code in my htacess :
Code:
## URL REWRITING ##
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]

</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule>

And my config.php :
Code:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_@-';

And i want to know i fixe this problem ?

Too, it's the same problem for a character like ',' '.',...

I want to replace like '-' or '_' and don't allow ',' , '.', ';' '?', '!', ...

Thank you for your helping.
#2

[eluser]Wuushu[/eluser]
Why dont you use the url_helper's url_title()?

When you link to your post, to something like

anchor('controller/method/id/' . url_title($title), $title)

Perhaps..




Theme © iAndrew 2016 - Forum software by © MyBB