Use relative urls in Joomla menus
I have joomla site which is located in mydomain.com/somefolder/otherfolder/TheSite
. I have created a rewrite rule to invisibly redirect all requests beginning with mydomain.com/TheSite开发者_高级运维
to this url. It works fine.
My problem is that the urls that my menuitems point to are the old mydomain/somefolder/otherfolder/TheSite/stuff
. If they were relative urls, it would work.
My question: How can I force joomla to use relative urls for the menuitems, or use the urls I explicitly specify?
Thanks in advance
Probably the easiest way to make Joomla produce only relative URLs is to edit the core method "_" of the JRoute
class:
JRoute::_()
This is called by Joomla application and extensions to generate consistent URLs.
It is found in:
libraries/joomla/methods.php
Making Joomla spit out relative URLs probably isn't the best way to do it. Making the absolute URLs point correctly would.
精彩评论