Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
20 views
ago in Q2A Core by

After searching on here for a solution to my problem, I found that other people was having the same issue. There wasn't an answer that worked for me. I have found a solution for me and maybe this solution would work for others.

The original .htaccess file:

Options -Indexes
DirectoryIndex index.php

<IfModule mod_rewrite.c>
    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]
</IfModule>

I have added the following to my .htaccess:

Options -Indexes
DirectoryIndex index.php

<IfModule mod_rewrite.c>
    RewriteEngine On
    # Uncomment the next line if needed, typically for subdirectory setups
     RewriteBase /

    # Remove double slashes in the URL
    RewriteCond %{REQUEST_URI} ^(.)//(.)$
    RewriteRule . %1/%2 [R=301,L]

    # Check if the request is not a file or a directory
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    # Rewrite all other requests to index.php
    RewriteRule ^(.*)$ index.php?qa-rewrite=$1&%{QUERY_STRING} [L,QSA]
</IfModule>

The only issue with this fix is that while in the admin area, Q2A still doesn't ok the first url structure option. I am not sure why, but at least I have fixed my issue. Maybe this fix will help others!

Q2A version: 1.8.8

Please log in or register to answer this question.

...