Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+5 votes
1.1k views
in Q2A Core by
Is there is simply way to change URL links like /categories, /ask, /questions... thanks for info :)

2 Answers

+4 votes
by
 
Best answer

For the example of /activity, you need to make the change in a few places. Make sure you're using your text editor in UTF-8 mode, and edit the bold phrases below:

In qa-page-home.php:

case 'activity':

In qa-page-admin-pages.php:

'nav_activity' => 'activity',

In qa-page.php:

'activity' => QA_INCLUDE_DIR.'qa-page-home.php',

$qa_content['navigation']['main']['activity']=array(

'url' => qa_path_html('activity'),

Similar logic applies for the other URLs, except some don't have an entry in qa-page-home.php. In general I'd recommend doing a full text search across the code base for the relevant word, and then trying to understand the PHP context to decide whether or not the substitution is necessary.

by
How would this affect pages allready indexed by google ? We would receive a lot of 404 ´s or not ?
Anyway, I would think this would be a good addition to the next update..
Regards, monk333
by
Yes I think you would get 404s for the old URLs, eg "example.com/activity". You should set up 301 redirects for activity to your new URL.
by
Thanks, I think this should be possible as it would be only a few redirects. I will try it on an test install first as htaccess from time to time is kind of tricky : )
0 votes
by
edited by

EDIT: I am not longer sure if it works like that, I hope someone can confirm this

EDIT 2: No, it does not work to change the links /activity ,...it only works for the phrase You use in Your menue.

So, this question is really interesting, would as well be happy to know how to change this.

 

You could use the language files for that.

Please see

http://www.question2answer.org/advanced.php

the section Translating...

there is described how You add a new language. In Your case You just would add a second english language and then search for the words You want have changed. This is in my eyes the easiest way.

by
Thanks but i'm already translated in my own language but permalinks are still english.
...