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

closed Why URL structure: First Option not active !????

+1 vote
59 views
asked Mar 17 in Q2A Core by redapplex
closed Mar 17 by redapplex

I have installed and not modified anything in .httaccess. However, when I go to the admin page, I find it does not work. Please fix this for me.

I setup in folder of domain. Ex: xyz.com/ask/

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>

Thank you.

Q2A version: Version 1.7.4
closed with the note: Active !
commented Mar 17 by arjunsuresh
"IfModule mod_rewrite.c"

modrewrite is enabled in apache? (sudo a2enmod rewrite)
commented Mar 17 by redapplex
how to "modrewrite is enabled in apache". You can instruction to me ?

2 Answers

+1 vote
answered Mar 17 by Scott
As arjunsuresh said it's most likely because mod_rewrite is not enabled. Check with your host.
+1 vote
answered Mar 17 by sama55
The determination logic of the first option may be insufficiant. Even on my server it is not ok. But I choose that option and it works correctly. I recommend that you check first. Then, if the URL does not work properly, you need to investigate the cause.
commented Mar 17 by Scott
There is probably an issue with certain characters in URLs that you aren't seeing in normal usage.

The OK icons are all iframes - if you open the URL you might get an indication why it's not showing OK for you.
commented Mar 17 by redapplex
i try but still not active.
...