Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
in Q2A Core by
how to create htaccess file, im not familiar with it, i just uploaded my other site htaccess file, but it not working, can some one could help me please?


1 Answer

+2 votes
selected by
Best answer
you can creat a text file and rename it to .htaccess and write your Module like this and save it to root of your project

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} libwww-perl.*
RewriteRule .* – [F,L]
#RewriteBase /
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L]
This helped me perfectly to make the URLS SEO friendly. Thank you very much!
I use ssl for my website. And now I notice that when I type http://www.mywebsite.com/something
it redirects me to http://www.mywebsite.com/index.php?qa-rewrite=something

But when I type https://www.mywebsite.com/something  then it works.

I have similar htaccess file, how I can fix it?