XOOPS Web Application System (https://xoops.org)

Powered by You!

publise

SEO Links in Publisher Module

Category : Hacks | Published by heyula on 07-Feb-2022 21:00
When I activate the seo feature in the publisher, the link will be as follows

publisher.item.6/kalici-makyaj.html

where .item.6 represents the article ID

With this hack, the link structure will be as follows

publisher-6/kalici-makyaj.html

Free of .item.6 software

What to do for this process

publisher/class/Seo.php - found on line 122 in the file

return XOOPS_URL '/' $helper->getConfig('seo_module_name') . ".${op}.${id}/${shortUrl}";


in its place

return XOOPS_URL '/' $helper->getConfig('seo_module_name') . "-${id}/${shortUrl}";


Replace with code.

Sample .htaccess

RewriteEngine   On

#For Ajax Rating -
RewriteRule ^modules/publisher/index.php/([a-z]+).([0-9.]+)/include/ajax_rating.phpmodules/publisher/include/ajax_rating.php?%{QUERY_STRING}
RewriteRule ^publisher.([a-z]+).([0-9.]+)/include/ajax_rating.phpmodules/publisher/include/ajax_rating.php?%{QUERY_STRING}

#SEO .Htaccess setting

RewriteRule ^publisher-([0-9.]+)/([a-z-]+).html modules/publisher/item.php?itemid=$[L]


Publisher SEO settings

Resized Image


New Link Example:

https://sevamed.com.tr/sevamed-17/sevamed.html

https://sevamed.com.tr/modules/sevamed/

Old Link Example:

https://www.togaysan.com.tr/urunler.item.9/kelepceler-ve-lastik-takozlar.html