Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
244 views
in Q2A Core by
I am planning to implement google hreflang for better geo targeting and seo.

Essentially a slightly different version for en-gb and en-us users.

Thus, need domain.com/en-gb and domain.com/en-us to deliver same answers and questions but slight variation in theme etc

What is the best way to achieve the same?

I have done made  following changes

In index.php for /en-gb i have

Set base path here so this works with symbolic links for multiple installations

define('QA_BASE_DIR', PATHFOREN_US);

Where PATHFOREN_US is path for domain.com/en-us

Is the above correct implementation?
Q2A version: 1.7

1 Answer

+1 vote
by
That will set both sites to the same folder, which will make them link to the same theme. Which can work, if your theme checks for PATHFOREN_US inside it and does things differently in each.

Another option would be to duplicate the core Q2A code in each folder, point them to the same database, but change the theme code in each of the folders. That does mean any updates have to be applied to both copies of the code though.
...