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

Hi,

I have a wordpress blog installed in root. I was doing a clean install of Q2A in a subdirectory integrating with wp database, as mentioned in your tutorial. All went good (Thanks to you people).

But, Now I am facing two problems -

Problem 1. is that I want to use

http://www.website.com/sample-post/

format for the worpress urls. And similar for Q2A

/123/why-do-birds-sing

But, if I enable above mentinoned format from Wordpress Settings, following is written in root .htaccess file -

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
 
and after enabling desired Q2A url format, following is written in .htaccess file of subdirectory (in which Q2A is installed) (in my case it is "/qa" ) -
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>
 
Now all the Q2A urls are broken, all return 404 error, because they are following rules mentioned under root .htaccess
I dont how and what to modify in .htacess or anywhere else to get the desired result?
 
Problem 2. I can reach the Q2A subdirectory with www. and without www. As far as I know, this would be bad for SEO, what should be done to correct this?
 

Pardon me for my language, I am a medical doctor, so dont have much knowledge of programming and technical terminology. ( I just hope you can understand, what I mean to ask! )

Thanks.

Regards,

Dr. Atul Tiwari

 

Wordpress v. 3.8.1

Q2A version: 1.6.3

Please log in or register to answer this question.

...