0

I was attempting to change the conf of my files in order to achieve port forwarding, however all of a sudden I get the following error when attempting to restart:

AH00526: Syntax error on line 30 of /etc/apache2/sites-enabled/000-default.conf:
RewriteCond: bad flag delimiters

I'm new to Apach2 so I'd appreciate if someone could provide input on what could be going wrong. I can't figure out what exactly the syntax error is.

This is how my files look: 00-defualt file

le-ssl file

EDIT:

These are the lines:

RewriteEngine on
RewriteCond %{SERVER NAME}=19thstreet.co
RewriteRule ^ https://%{SERVER NAME}%{REQUEST URI} [END,NE,R=permanent]
Tim
  • 31,888
  • 7
  • 52
  • 78
Mansidak
  • 11
  • 2

1 Answers1

1

I figured it out. It was the underscore in Request_URL:

RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
Mansidak
  • 11
  • 2
  • Also the correct lines would be RewriteEngine On RewriteCond %{SERVER_NAME} 19thstreet.co RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] – dzup4uk Mar 06 '23 at 20:10