Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
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
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)
Thank You so far, but my question was not correct:

I need the slash at the end not .html


old static page

new q2a page

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 ?
Ok, it was already in the questions.

To get the trailing slash on custom pages this solution still works fine:
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
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.