0

I am building something with php and I want the files to be instead of exampe shop.php to be /shop/

Ho do I do this in php? if its even possible.

Roy
  • 1
  • 4
  • 1
    Search function always comes in handy. There are hundreds of questions for this. Search for .htaccess re-writes. – Akshay Jan 24 '16 at 17:56
  • taking out .php is possible.. but keeping that in folder format is not possible /shop/.. you can have like this either /shop.. – ameenulla0007 Jan 24 '16 at 18:00
  • i mean if for example in the shop you can go the history so its going to be " /shop/history " – Roy Jan 24 '16 at 18:02

1 Answers1

1

Here's an example of how to do it.

RewriteEngine On

RewriteRule ^shop/?$ shop.php

Read more on URL-rewriting here :- http://corz.org/server/tricks/htaccess2.php

Akshay
  • 2,244
  • 3
  • 15
  • 34