Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
939 views
in Q2A Core by
Hi,

i wan't to change adress bar url names.

for example;

www.domain.com (main page)

when i click any menu link. adress bar url change

www.domain.com/ask
www.domain.com/questions
www.domain.com/categories

how can i change this url name's

www.domain.com/mylink
www.domain.com/mylink1
www.domain.com/mylink2 etc.
Q2A version: 1.6.2

1 Answer

+3 votes
by
selected by
 
Best answer

If  you go through qa-config.php file, you will find an example for what you are looking. See below

$QA_CONST_PATH_MAP=array(
'questions' => 'topics', // change topics with your text to change questions title in url
'categories' => 'sections', // change sections to your text to display instead of categories
'users' => 'contributors', // etc....
'user' => 'contributor', // etc....
);
 
Find above code in qa-config.php and add yours there and done..
 
Update
 
You should add and modify code same as below
 
/*
If you wish, you can define an array $QA_CONST_PATH_MAP to modify the URLs used in your Q2A site.
The key of each array element should be the standard part of the path, e.g. 'questions',
and the value should be the replacement for that standard part, e.g. 'topics'. If you edit this
file in UTF-8 encoding you can also use non-ASCII characters in these URLs.
 
$QA_CONST_PATH_MAP=array(
'questions' => 'topics',
'categories' => 'sections',
'users' => 'contributors',
'user' => 'contributor',
);
*/
 
$QA_CONST_PATH_MAP=array(
'questions' => 'topics', // change topics with your text
'categories' => 'sections', // change sections with your text
'users' => 'contributors', // etc..
'user' => 'contributor', // etc...
);

 

by
i find it in qa-config.php
but code block is seen disabled.
I think i need to add this code in qa-config.php
how can I make changes?

thx.
by
You need to add this code after comment. where you find */ right after there.. see my Updates in answer abvoe
by
it's ok
thank's.
...