Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
151 views
in Q2A Core by
I have already finished everything with my new website, but I don't know how to solve this problem.

My category URL is for example: /questions/auto. I would like to change word 'questions' in URL with word 'tema'. So category URL should be tema/auto with pagination enabled below. I wouldn't like to keep word questions because I make website in non English language. Thank you in advance.

I already have activated $QA_CONST_PATH_MAP=array('questions' => '');, because I want to see questions with pagination on home page. (maybe this info is important for possible solution).
Q2A version: 1.8.5
by
edited by
+2
It's rather complicated, and I don't think we can easily change it because there are various functions related to that URL structure. I think the easiest way is to configure $QA_CONST_PATH_MAP=array('questions' => 'tema'); But you will need a different page to set as homepage. If you have spent sometime with Q2A, I would suggest creating a custom page that functions exactly the same as the page yoursite.com/questions does. For example, you create a page yoursite.com/consquistador, then you set is as homepage

$QA_CONST_PATH_MAP=array('questions' => 'tema','conquistador' => '');

However, later, you will find out that your user profile urls may need some changes too because they will show like yoursite.com/user/Alfonso/questions or yoursite.com/user/Alfonso/answers
(The solution for this: https://www.question2answer.org/qa/85214/is-there-any-way-to-change-url-for-user-questions)

1 Answer

0 votes
by
I used 'example-page' plugin. I created custom 'Home' page. I'll 301 redirect later in .htaccess to the root domain. I deleted some unnecessary lines in 'qa-example-page.php' and pasted lines from 'questions.php'. So far it works but I have to check if there is some bugs. Thank you.
by
it is not good move for SEO , and You will find alot of issue on future
by
I can use canonical tag for duplicate home pages. I added ' /questions' (so it is rewritten to 'tema') on some lines on pages  I didn't change anything in database. I'm not PHP expert, but so far it works. Second option to me was to add pagination to domain.com/my-category, but I didn't know how to do that. Would you be so kind to write what kind of issue I would find in the future with this solution?
by
As long as you don't submit the hidden custom page to Google. Nothing to worry. It's a very simple practice as in Wordpress.com blogs. Only you know the existence of the that custom page, and you don't even need to 301 redirect.

However you should check your sitemap (generated by Sitemap plugin) to see if there are some undesirable URLS. Who knows!

The real problem is the ugly Category urls. Yoursite.com/questions/automobile and Yoursite.com/tema/automobile coexist.   Yoursite.com/questions/automobile and Yoursite.com/automobile are almost identical most of the time.  But the important thing is that it's very not handy for users to browse old questions, because they will have to read the first page again.

After spending sometimes with Q2A, I decide not to use Categories. Big sites like Stackoverflow or Quora don't use categories, only tags.

If you check out the profile of jair. He did write a plugin to add pagination to categories. Pay him if you want. https://www.question2answer.org/qa/user/jair
by
"The real problem is the ugly Category urls. Yoursite.com/questions/automobile and Yoursite.com/tema/automobile coexist.   Yoursite.com/questions/automobile and Yoursite.com/automobile are almost identical most of the time."

Search engine bots and users won't find duplicate pages because I'll check every link on my website. But I will add canonical tag to desirable pages in any case. Everything can be solved via .htaccess  but I'm getting really weird result when  I want to redirect just one 301 redirect: /teme to root. It adds: '?qa-rewrite=tema  to URL. I couldn't find solution for this problem on this website so far. If you have solution, please share it. Ordinary .htaccess redirection must work.

Sitemap and RSS FEED are OK.

Beside all of this I will add "noindex, follow" to some pages.

It was much easier 10 year ago when just ordinary social bookmarking websites with the lack of the content could rank well in Google search results. Search engines now wants plenty of content. And quality backlinks, of course.
...