Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
992 views
in Q2A Core by
edited by

I want to change my url structure

Form

www.mydomain.com/?qa=123/

to

www.mydomain.com/123/

 I know that it needs .htaccess file but I cannot fix it

This is my .htacessfile

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>

Q2A version: 1.8.3

2 Answers

0 votes
by

You don't need to write any .htaccess rules.
There's an option for that in the Admin section called " URL structure. "

Navigate to:

Admin > General settings

by
I know this option:  /123/why-do-birds-sing in Admin > General settings but when  I use it, the site doesn't work
–1 vote
by
Your server must be something different from APACHE.
...