Jump to content

Directories without index page


eleven0

Recommended Posts

I got a question. Not too sure if it's related to php or not.

 

Lets say that I got a directory called "main"

 

when i type this "mysite.com/main". It would take me to the index page of that directory. I don't like having file extensions in my site. To avoid that here is what i do;

create a directory called "main" and create an index file inside that folder and have

<meta HTTP-EQUIV="REFRESH" content="0; url=mysite.com/main.php">

in that index file.

 

My question is;

 

Is that possible to achieve what i did above without creating and going through all those steps. Lets say  I have "mysite.com/main.php", so when someone types "mysite.com/main" in their browser, they would go to mysite.com/main.php. I know this is possible using .htaccess.

 

Anyway of doing this without creating the directory?

Link to comment
https://forums.phpfreaks.com/topic/95908-directories-without-index-page/
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.