Jump to content


Photo

Removing .php and other exentions from urls


  • Please log in to reply
1 reply to this topic

#1 mcslug

mcslug
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 21 June 2006 - 02:46 PM

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!

#2 dptr1988

dptr1988
  • Members
  • PipPipPip
  • Advanced Member
  • 372 posts

Posted 24 June 2006 - 01:01 AM

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.


Need more help with your project? One of the thousands of programmers, web designers or artists at <a href="http://www.rentacode...d_6764522">Rent A Coder</a> would be happy to help.

Disclaimer: Free advice is usually worth what you paid for it. ( or at least when it's coming from me! )




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users