Egysolutions Posted November 18, 2008 Share Posted November 18, 2008 Hello Usersi want to rewrite the tags URLs /shop/search.php?tag=Egypt+Toursto be:/shop/tag/Egypt+ToursRegards Link to comment Share on other sites More sharing options...
ramires Posted November 27, 2008 Share Posted November 27, 2008 Hello Usersi want to rewrite the tags URLs /shop/search.php?tag=Egypt+Toursto be:/shop/tag/Egypt+ToursRegards hmm i think that better way for that will be somethink like this (of course for robots and positioning)/shop/tag-Egypt+Tours.htmlin htaccess you should put somethink like this:RewriteCond ^tag-(*.)\.html$ search.php?tag=$1 [here some optional params]Of course you need to change a bit BlockTag for thisedit:i make it on my site now:1. make a backup2. edit modules/blocktags/blocktags.tpl3. change in line 7 {$tag.name} to {$tag.name} 4. make a backup .htaccess5. add line at the end of file: RewriteRule ^tag-([a-zA-Z0-9-]*)\.html$ search.php?tag=$1&%{QUERY_STRING} [L,E] thats allyou can check how it works on my site http://pro-adventure.pl (still on original theme, but i plan to change all) Link to comment Share on other sites More sharing options...
Jo! Posted November 29, 2008 Share Posted November 29, 2008 2 ramiresCan you tell me please, what should I do if I get links like this: http://xxxx.ru/presta/tag/% D0% BB% D1% 83% D1% 87% D1% 88% D0% B8% D0.html (with no spaces after %, I've added spaces because on this page the letters are OK) after i've changed .htaccess and blocktags.tpl?This is encoding problem, as i understand. English letters in tags work great, but if i put cyrillic, i have above problems. I changed blocktags.tbl line 7 to: {$tag.name|escape:htmlall:'UTF-8'} But still getting same problems... Link to comment Share on other sites More sharing options...
ramires Posted November 29, 2008 Share Posted November 29, 2008 2 ramiresCan you tell me please, what should I do if I get links like this:http://xxxx.ru/presta/tag/% D0% BB% D1% 83% D1% 87% D1% 88% D0% B8% D0.html (with no spaces after %, I've added spaces because on this page the letters are OK) after i've changed .htaccess and blocktags.tpl?This is encoding problem, as i understand. English letters in tags work great, but if i put cyrillic, i have above problems. I changed blocktags.tbl line 7 to: {$tag.name|escape:htmlall:'UTF-8'} But still getting same problems... You need to change to latin chars before link/tag is generated.Without this your shop will not generate good tags/links.preg_replace() use to clean the chars and convert it as htmlspecialchars or else ... in cyrilic i think that can be a problem with that so i suppose that without deeper changing of code you will not get expected result. Link to comment Share on other sites More sharing options...
WS Reparatie Posted November 3, 2012 Share Posted November 3, 2012 dosen't work for me what i have to change in blocktags.tpl this step not clear for me Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now