0

I have domain name for my magento 2 site something like https://abcxyz.com/index.php, and my project folder name is something like shop.xyz.com (folder name). Now I have added an external file test.php inside magento 2 folder. I want something like https://abcxyz.com/test.php. How can I get like this in magento header phtml file ?? Thanks for the help in advance.

0
  1. Use Web Server Rewrites: YES
Go to System >>  Configuration >> Web >> Search Engines Optimization
  1. Use secure URL Frontend: YES
Go to System >>  Configuration >>Web >>Secure

Flush the cache and check your domain is working without index.php

Note. Check if .htaccess is working or not

Hope this solution will work for you

  • Thanks, but I want to call test.php file in phtml file, can you please help me out ? – Dharma Teja Aug 1 at 9:54
  • If your magento instance run without index.php then you can access test.php like this - yourdomain.com/test.php – Mitro Aug 1 at 10:03
  • is there a way that without removing index.php can we add test.php ?? – Dharma Teja Aug 1 at 10:06
  • You can create index.php instead test.php and put it in some folder name for eg.test and you can access it by domain.com/test in which test is your folder name – Mitro Aug 1 at 10:11
  • So if I remove index.php will domain.com/test.php work ? – Dharma Teja Aug 1 at 10:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.