How to modify HTACCESS file for non-WordPress documents

Solved (5 hours later!) The following code in my PHP programs were causing “index.php” to appear at the end of URLs when the program was called a second time.

<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>

I simply replaced this code with:

   <?php echo htmlspecialchars('https://suncatcherstudio.com/monogram-maker/');?>

With PHP_SELF:

 First time called: https://suncatcherstudio.com/monogram-maker/
Second time called: https://suncatcherstudio.com/monogram-maker/index.php

New approach:

  First time called: https://suncatcherstudio.com/monogram-maker/
 Second time called: https://suncatcherstudio.com/monogram-maker/

Leave a Comment