开发者

RewriteRule to RewriteRule?

I want to write a RewriteRule to another RewriteRule, but I can't seem to get things to work. I'm having troubel with the line

RewriteRule ^(eTool/)?(RENDER/\d+/\d+/\d+/\d+\.html)$ render-product?url=$2 [L,NC]

in this file:

RewriteEngine On
RewriteBase /

RewriteRule ^(eTool/)?(RENDER/\d+/\d+/\d+/\d+\.html)$ render-product?url=$2 [L,NC]

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

# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-a开发者_运维百科dmin$
RewriteRule ^(.+)$ $1/ [R=301,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]

Basically, the url render-product is a url frendly url created by wordpress. I want something like ?url=RENDER/34324/4234/234234.html to be accessible on the wordpress page render-product via $_GET['url'].

What am i doing wrong?


RewriteRule ^(eTool/)?(RENDER/\d+/\d+/\d+/\d+\.html)$ index.php?pagename=render-product&url=$2 [L,NC]

I've suggested rewriting the URL to WP as query parameters, since WP won't parse the permalink of the rewrited URL, it will only examine the original URI request (if that makes sense!?).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜