Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
  • Register
Welcome to the Q&A for Question2Answer.

If you have questions about the platform, click here to ask and please use English.

If you just want to try Q2A, please use the demo, which also grants admin access.

Apr 29: Q2A 1.5.2

No .htaccess file. Need help please

+1 vote
I also cannot access the htaccess file. Please can you post it here for us?

Many thanks
asked Feb 13, 2011 in Q2A Core by testertester

1 Answer

+1 vote

If you are using Linux (and probably Mac since it's based on Unix), then the .htaccess is hidden by default. You can change your options in the file explorer (e.g. Nautilus) to show hidden files, or you may be able to press Ctrl+H to toggle them on/off.

If you still can't see it, here is the default contents:

DirectoryIndex index.php
RewriteEngine On
#RewriteBase /your-sub-directory
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]

If you are using a decent FTP client like FileZilla you will see .htaccess listed in the file list even if it is hidden on your system.

answered Feb 13, 2011 by DisgruntledGoat
Many thanks for your help. Will try now and let you know. Very grateful
Hi DisgruntledGoat...

I tried this with the following :

DirectoryIndex index.php
RewriteEngine On
#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]

as i dont have a sub directory... i.e all questions sit on the main domain

still seems to be creating a 500 error see : http://gossipdrum.com/categories

Please can you advise?

Thanks in advance
I use FileZilla and see no .htaccess file, the file has been deleted by lighthttpd web server and all plugin pages like domain/page-name become 404 pages :(