Jump to content

False Directory To Hide .php Extention In Url - Ex: .com/blah/ Not .com/blah.php


wait

Recommended Posts

I've searched google for this and I'm not 100% sure if this is even a .php related request but... I'm attempting to create (for lack of better description) "false directories" that prevent the .php extention from displaying in specific URLs.

 

I'm creating user profiles for my site and rather than display:

.com/u/username.php

I would like to display:

.com/u/username

 

I have a feeling this might be server related. Shot in the dark. Hope someone can shead some light on this for me.

 

Thanks as always!

Well, I'm open for suggestions. I have a directory called

 /u/

and would like the username or profile page not to have a .php extension. I would like to handle this in the most efficient way. Just don't know how to go about it. I read this can be handled in .htaccess but if there is a better way.... I'm open.

 

- Stupid question (avatar) Got it.

This is now how this is typically done:

 

Ideally you would have one page. say, user.php

 

you would link to that page with a variable, like site.com/user.php?id=135 or site.com/user.php?u=wait

 

you would then use $_GET['id'] and query a database for that members info.

 

 

whichever way, you'll still need mod rewrite to do what you want

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.