-1

I want to run localhost/page?test=1 but since I use php I have to create a folder called "page" and then an index.php file inside it. Even if I do that it's not the same, I'll have to call localhost/page/?test=1 and not localhost/page?test=1

I really didn't know what to google so this is the perfectly way to describe my problem.

CatDog
  • 31
  • 2
  • 1
    Does this answer your question? [Remove .php extension with .htaccess](https://stackoverflow.com/questions/4026021/remove-php-extension-with-htaccess) – Martin Jul 02 '20 at 22:01

1 Answers1

0

You can use htaccess to remove the file extension from the URL --> to map index to index.php in the URL

So the URL becomes

localhost/page/index?test=1 instead of localhost/page/index.php?test=1

Read how to do It and more about .htaccess here

EEAH
  • 715
  • 4
  • 17