O ome999 New Member Oct 31, 2019 #1 Oct 31, 2019 #1 I am trying to get this rewrite rule working on OpenLiteSpeed Server with Cyberpanel. Code: <IfModule mod_rewrite.c> RewriteCond %{HTTP_REFERER} abc.com [NC] RewriteRule ^/?download/(.*) https://abc.com/ [R=301,L,NC] </IfModule> Please help.
I am trying to get this rewrite rule working on OpenLiteSpeed Server with Cyberpanel. Code: <IfModule mod_rewrite.c> RewriteCond %{HTTP_REFERER} abc.com [NC] RewriteRule ^/?download/(.*) https://abc.com/ [R=301,L,NC] </IfModule> Please help.
P Pong Administrator Oct 31, 2019 #2 Oct 31, 2019 #2 Please try the following rule: Code: <IfModule mod_rewrite.c> RewriteCond %{HTTP_REFERER} abc.com [NC] RewriteRule ^download https://abc.com/ [R=301,L,NC] </IfModule> Make sure you restart OLS everytime you made change to .htaccess If this virtual host is for abc.com domain only, you may NOT need the following condition, just one line rewrite rule should be fine. Code: RewriteCond %{HTTP_REFERER} abc.com [NC]
Please try the following rule: Code: <IfModule mod_rewrite.c> RewriteCond %{HTTP_REFERER} abc.com [NC] RewriteRule ^download https://abc.com/ [R=301,L,NC] </IfModule> Make sure you restart OLS everytime you made change to .htaccess If this virtual host is for abc.com domain only, you may NOT need the following condition, just one line rewrite rule should be fine. Code: RewriteCond %{HTTP_REFERER} abc.com [NC]