WordPress – Apache: The given path contained wildcard characters

apache-2.2wildcardWordpress

The problem is not a persistent one; it happens sometimes and I am unable to recreate it (even using the same urls).

[Tue Dec 20 09:07:12 2011] [error] [client 66.249.66.169] (20025)The
given path contained wildcard characters: access to /?p=2463 failed

[Tue Dec 20 10:10:30 2011] [error] [client 110.0.107.198] (20025)The given path contained wildcard characters: access to /proxyimages.php?url=http%3A%2F%2Fi.imgur.com%2F2DKZ0.jpg&mimeType=image%2Fjpeg failed

I am using a WordPress blog with some modifications, and since a while a go i have been getting a lot of those errors from apache, and google results for this problem aren't helpful…

Any ideas?

EDIT:

Some virtual hosts are only thing different from the clean httpd.conf

<VirtualHost *:80>
    DocumentRoot C:/xampp/htdocs/
    ServerName 94.102.49.102    
</VirtualHost>


<VirtualHost *:80>
    DocumentRoot C:/xampp/htdocs/site1
    ServerName www.site1.com
    ServerAlias site1.com *.site1.com
</VirtualHost>


<VirtualHost *:80>
    DocumentRoot C:/xampp/htdocs/site2
    ServerName www.site2.info
    ServerAlias site2.info *.site2.info
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot C:/xampp/htdocs/site3
    ServerName www.site3.com
    ServerAlias site3.com *.site3.com
</VirtualHost>

And the .htaccess generated by wordpress

# 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

Best Answer

The problem is that there is a character that is being inserted into URLs that needs to be escaped or removed. Some rule somewhere in apache is placing that character. You must take into account any rewrite rule or AliasMatch rule.

Copy your existing httpd.conf file and put a vanilla conf in its place. See if the problem exists. diff the two files and start adding blocks back in one at a time and testing your server. If you use mod_alias, disable that and see if the problem persists. It's also possible that you're inheriting some troublesome regex in an .htaccess file somewhere. Check those and rule out any possibility there.

Once you've narrowed the issue down, you can report back and we can be of more help.

Edit 1

This is sounding like an application error. It could be something with one of your Wordpress plugin. The errors suggest that something is throwing unescaped characters into your URLs. Perhaps a decodeURI function. Of primary concern is any rewriting that is happening to pull in files and documents that are outside of the web server's document root.

Disable all plugins in your wordpress installation and check for errors. Add them back in one at a time and see when the errors resurface.

Related Topic