• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

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

allewreK

Active member
#1
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
 

Adam Howard

Well-known member
#2
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).
 

allewreK

Active member
#3
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.
 

Adam Howard

Well-known member
#4
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
 
#10
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 !
 

allewreK

Active member
#11
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 ;)