Jump to content

hiding the .php


VirusDoctor

Recommended Posts

Hi guys, I was wondering...

 

is there a way to hide the .php in a url but still make it direct to the correct page?

 

for example:

 

www.test.com/members.php

 

if a user types in members it would direct to members.php but hide the .php in the url.

 

Which would now be www.test.com/members

Link to comment
https://forums.phpfreaks.com/topic/82664-hiding-the-php/
Share on other sites

You can name the page as index.php and the url as the directory name.  Say you want to type www.something.com/members to take you to a members area.  Just create a subdirectory of your site's root dir named members and the initial page that loads within that directory as index.php.  Not totally sure this is good structuring practice on the internet side but it is the way we design our web based programs at my company.

Link to comment
https://forums.phpfreaks.com/topic/82664-hiding-the-php/#findComment-420480
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.