mod rewrite - htaccess redirect to path

I'm trying to get my site to redirect to a certain folder depending on a condition. This condition cannot be done w

I'm trying to get my site to redirect to a certain folder depending on a condition. This condition cannot be done within WP, so...

Anyway.. I've done conditions before, but I keep hitting a wall whenever I do a rewrite, since the site is a Wordpress site.

My redirect is:

RewriteCond %{HTTP_COOKIE} !JVL=NL;
RewriteCond %{REQUEST_URI} !^health-studies/
RewriteRule ^(.*)$ /health-studies/ [L,R,CO=JVL:NL:www.domain:7200:/]

So basically.. (depending on the condition of course), it needs to redirect to /health-studies/. Example: When people go to example, it needs to redirect to example/health-studies/

However.. I'm running into an error: ERR_TOO_MANY_REDIRECTS

What am I missing? (Must be something little..as always)

Additional htaccess code AFTER the above few lines:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain [NC,OR]
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^(.*)$ /$1 [L,R=301]

# 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>

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745342941a4623412.html

相关推荐

  • mod rewrite - htaccess redirect to path

    I'm trying to get my site to redirect to a certain folder depending on a condition. This condition cannot be done w

    2小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信