Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
1.1k views
in Q2A Core by
Hello, is it possible to add to the end URL of the file extension .php?

Example:

instead -

http://www.question2answer.org/qa/49886/my-site-is-not-being-indexed-in-google

It became -

http://www.question2answer.org/qa/49886/my-site-is-not-being-indexed-in-google.php

Sorry for my poor English, thanks.
by
Why would you want to do that? There is no benefit that I know of.
by
After a while I want to close on its website a section Q&A and all the pages to archive in the PHP files.
So in the future, to not to redirect the old URL via htaccess I want to immediately create the necessary me URL.
I tried to change the function qa_q_request but nothing happened.
Sorry for my poor English, thanks.

1 Answer

+1 vote
by

You can do this with .htaccess. Modify the one that comes with Q2A by adding ".php" to the end of the RewriteRule regex, like this:

RewriteRule ^.*\.php$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L]

...