Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
1.9k views
in Q2A Core by
I also cannot access the htaccess file. Please can you post it here for us?

Many thanks

1 Answer

+1 vote
by

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.

by
Many thanks for your help. Will try now and let you know. Very grateful
by
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
by
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 :(
...