htaccess replace a character with another character

52 views Asked by At

I'm using osclass and in the search url it's return commas in the url example :

http://127.0.0.1/search/keyword,trt
http://127.0.0.1/search/keyword,trt/category,photography

I want to change the urls somthing like :

http://127.0.0.1/search/keyword-trt
http://127.0.0.1/search/keyword-trt/category-photography

My .htaccess now is

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

#I add this line but not working
RewriteRule ^(.*),(.*)$ /$1-$2 [L,R=301]
</IfModule>

I deactive friendly SEO URL but still htaccess not working

0

There are 0 answers