I need to add these lines to my .htaccess file via PHP
RewriteCond %{REQUEST_URI} checkout
RewriteRule ^(.*)$ https://myurl.com/checkout/$1 [R,L]
RIGHT after this line:
RewriteBase /
AND before this line:
RewriteCond %{REQUEST_FILENAME} !-f
This is how the current file looks w/o the new line addition:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php [L,QSA]
It needs to look like this when the new lines are added(extra line breaks not necessary):
RewriteBase /
RewriteCond %{REQUEST_URI} checkout
RewriteRule ^(.*)$ https://myurl.com/checkout/$1 [R,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php [L,QSA]
The line numbers may not match up, so I cannot use the line number.