assela Pathirana:Hacks Specific to This Site

From assela Pathirana
Revision as of 09:06, 20 March 2006 by Root (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

These hacks are dangerous. They have been done as last resort to overcome problems that were otherwise unsolvable. Do not use these in any other situation. Recorded here only as a reference.

Search Not Working

When URL forwarding and very short urls used together my Mod_Rewrite scripts could not handle the search function. The following was done to overcome this problem.

Note
The URL rewriting should not rewrite requests with index.php
        function getSearchLink() {
                $searchPage =& Title::makeTitle( NS_SPECIAL, 'Search' );
                #Assela hack HACK
//                return $searchPage->getLocalURL();
                return "/index.php?Special:Search";