.htaccess problem under LiteSpeed, not parsing variables in 'Header set link' instruction

Jean-Baptiste

Well-known member
Hello,

I have a quite strange problem with LiteSpeed (CentOS).

I would like to canonicalize some pages, so I added that to my htaccess :

Code:
Header set Link '<http://%{HTTP_HOST}e%{REQUEST_URI}e>; rel="canonical"'

The problem is that when I check my headers, I'm receiving the exact same string as above :

That means that my web server is not parsing my variables in this instruction.

  • In the same .htaccess files, all my Rewrite rules are working fines, with variables.
  • I tried the same instruction under apache2 localhost and it's working.

Best regards;

cc @Slavik , @lsmichael
 
If you're using Open LiteSpeed, you should know that it does not read htaccess. Your rewrite rules and other values need to be imported into the config (you can do so via Open LiteSpeed's control panel).
 
If you're using Open LiteSpeed, you should know that it does not read htaccess. Your rewrite rules and other values need to be imported into the config (you can do so via Open LiteSpeed's control panel).

Hello Adam, thanks for the reply,

I'm using LiteSpeed 4CPUs Entreprise LiteSpeed, I'm sure it's reading my .htaccess file since it's correctly redirecting + I'm receiving the variables in headers, but as pure string, not parsed as variables.
 
Hello Adam, thanks for the reply,

I'm using LiteSpeed 4CPUs Entreprise LiteSpeed, I'm sure it's reading my .htaccess file since it's correctly redirecting + I'm receiving the variables in headers, but as pure string, not parsed as variables.
Alright. Wanted to be sure (a lot of people simply say, LiteSpeed and never know the difference).

I've never used the full enterprise edition. Sorry I don't know what you're doing wrong

@Slavik , @lsmichael
 
I checked again and again, it looks like you can't add variables in the "Header" directive under LiteSpeed :mad:
Well that really sucks.... That's kind of an important feature to be leaving out.

Did you double check on LiteSpeed's support forums?
 
Sorry for the delay. @allewreK did the right thing and posted the question to our forum. Turns out we don't support using variables in a Header directive yet. The developer says it will be worked into a future release. (Probably 4.2.x, but it might have to wait for 5.0.)

Thanks for asking @allewreK !
 
Sorry for the delay. @allewreK did the right thing and posted the question to our forum. Turns out we don't support using variables in a Header directive yet. The developer says it will be worked into a future release. (Probably 4.2.x, but it might have to wait for 5.0.)

Thanks for asking @allewreK !

Amazing, thanks you very much, can't wait to see it released lol ;)
 
Top Bottom