Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
409 views
in Q2A Core by
I want to migrate a project to q2a and need extra pages ending with .html in the browser to avoid redirects.

Any idea ?

2 Answers

+1 vote
by
If you mean actual html files, as long as the file is actually where it should be, there should be no redirect; it's only when the file isn't found or isn't accessible by apache that it performs redirects.

If you mean actually creating Q2A pages with names like example-plugin-page.html, this is accomplished with the page module; use the example page plugin and just change the request to yourpage.html (in two places in qa-plugin/example-page/qa-example-page.php)
by
Thank You so far, but my question was not correct:

I need the slash at the end not .html

Example:

old static page
http://www.algarve-portugal.de/algarve-ausflug/

new q2a page
http://www.algarve-portugal.de/algarve-ausflug

On the end the slash is missing, this is what I need.
Now google has the pages with / and it works with q2a, but when visiting another page inside q2a the slash disappears, so google sees duplicate content once with slash once without.



By the way, what does the example page plugin do ?
by
Ok, it was already in the questions.

To get the trailing slash on custom pages this solution still works fine:
http://www.question2answer.org/qa/1118/how-to-add-a-trailing-slash-end-of-the-url
by
To avoid duplicate content use:
<link rel='canonical' href='http://www.mydomain.com/the-real-url' />
in the <head> ... </head>

Google will index the content on the domain specified even if the URL is different.

When we changed our site structure we used it heavily (site is not q2a though): http://www.echteinfach.tv/
0 votes
by
You can change extension in .htaccess file (for .html or any other), but I will no provide sample, because I am not sure, that it can make some conflict with q&a structure. I think no conflict, but. Check .htaccess samples for files extensions.
...