Jump to content

Archived

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

mcslug

Removing .php and other exentions from urls

Recommended Posts

Is there a way to remove .php or .html, or .whatever extentions from the url bar when users visit pages on mysite? For example, if a user goes to www.mysite.com/edituser.php it shows the url as:
www.mysite.com/edituser.php

I don't want the .php to be visible to the users. How would I remove extensions from web urls?

Right now for a user to go directly to the edituser page they have to type in the entire url:
www.mysite.com/edituser.php

I know I can set up a virtual directory or entry for edituser that will redirect to edituser.php, but the url bar will still show www.mysite.com/edituser.php

I know mod_rewrite will most likely be involved, but the examples I've read haven't helped.

Any help is greatly appreciated!

Share this post


Link to post
Share on other sites
If don't want any filenames, you can create a folder for each page and put an index.php in that folder. Or if you don't want the .php extenstion you can change you AddType directive for application/x-httpd-php.

Share this post


Link to post
Share on other sites

×

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.