Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
5.9k views
in Plugins by
edited by
You know when we add new page by plugins, Q2A system generate a link like that: http://localhost/q2a/pluginname. For example, if you install FAQ and Badge plugin (by @NoahY), you have 2 pages with the links like:

http://localhost/q2a/faq

http://localhost/q2a/badges

and Q2A system controls the new page links by create or modify a .htaccess file. And troubles come from that, my server doesn't accept any .htaccess file, and it deletes all .htaccess file which I've uploaded and the link like: http://mydomain.com/faq doesn't work (it responses an 404 error).

So, how can I fix the problem? Can the Plugin make a simple link without the use of .htaccess like: http://mydomain.com/index.php?page=qa instead of the default
Q2A version: 1.5.x
by
It must allow. Talk to your provider.

1 Answer

+2 votes
by
selected by
 
Best answer

I can do it by hard coding the file qa-app-format.php in Core, line 1098

Orginal Code

[php]

$navigation[($page['flags'] & QA_PAGE_FLAGS_EXTERNAL) ? ('custom-'.$page['pageid']) : $page['tags']]=array(
                'url' => qa_html($url),

[/php]

and my code here

[php]

$navigation[($page['flags'] & QA_PAGE_FLAGS_EXTERNAL) ? ('custom-'.$page['pageid']) : $page['tags']]=array(
              'url' => '?qa='.$page['tags'], // changed here

[/php]

Problem solved but I prefer to do it via plugin (if I can overide the qa_navigation_add_page function) rather than hard-coding it.

by
ok, it's what I need :D
...