开发者

RewriteRule and Wordpress Page Parameters

I want to send custom parameters to my wordpress page. and have this rule.

RewriteRule ^mypage/(.+)$ index.php/mypage/?url=myparameter [L]

The funny thing is it works great on my local box but does not work on my online server. Rewrite is enabled and if i rewrite it to load image it works great but if i use this rule wp returns 404. I really have no idea what to do.

here is the complete htaccess file. the only difference is the rewr开发者_JAVA技巧itebase parameter locally

RewriteBase /mysite/
RewriteRule . /mysite/index.php [L]

online

RewriteBase /
RewriteRule . /index.php [L]



# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /mysite/
RewriteRule RewriteRule ^mypage/(.+)$ index.php/mypage/?url=myparameter [L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /mysite/index.php [L]
</IfModule>

# END WordPress
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜