Tag Archives: .htaccess

WordPress: It Didn’t Work: Unknown column ‘**’ in ‘where clause’

I saw this message again when I put this line in the IE’s address space:

http://localhost/aa/yy-1-1

it shows:

It Didn’t Work: Unknown column ‘yy’ in ‘where clause’

It shows that this line in the .htaccess file is related:

RewriteRule ^/aa/(.+)-(.+)-(.+)$ /aa/layer_detail.php?tid=$1&page_no=$2&page=$3 [NC,QSA,L]

I met such a problem on the space hosting server. I thought it’s the server’s mistake. More details in:
The WordPress issues are solved

I changed the line to:

RewriteRule ^/aa/([0-9]+)-([0-9]+)-([0-9]+)$ /aa/layer_detail.php?tid=$1&page_no=$2&page=$3  [NC,QSA,L]

Now, I type: http://localhost/aa/yy-1-1

It shows: 404.html. It should be that this RewriteRule in .htaccess works:

ErrorDocument 404$ 404.html

I changed the RewriteRule in the .htaccess in the hosting space server too and now, I can use the original WordPress now. 🙂

.htaccess and AllowOverride All

I try to let the Apache use .htaccess file, instead of RewriteRule in the httpd.conf file.

I found online saying:

In the file httpd.conf in the folder: C:\xampp\apache\conf, change

AllowOverride None

to

AllowOverride All

Then, the content in .htaccess will be used.

I’m trying to see how it works now.

added on 4:59 pm:

I go to c:\xampp\apache\bin, use httpd -k restart to restart httpd.exe,  it still doesn’t work. I copied the .htaccess file in the root folder. It still doesn’t work.  It’s said that the file direction should be defined in httpd.conf. I will try it when I have time.