开发者

.htaccess having trouble with url variable containing double forwardslash

I have a WordPress install that uses a fairly vanilla .htaccess file. There are some files in a directory on the server that users should be able to access via a link sent in an email. That link contains URL variables, including a second URL. Something like:

www.mysite.com/email/email.php?src=http://source.com&title=sample

My mod_rewrite rules should allow access to it, but as long as the link contains '//' the user sees a 404 page on the WordPress site, rather than accessing the intended email.php开发者_如何转开发 file.

Here's the .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
#RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ $1/ [R=301,L]

RewriteCond %{REQUEST_URI} ^/email$
RewriteRule . - [L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
</IfModule>

<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>

Any ideas on what I've done wrong?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜