Remove user id from url

Hi there,

I have a website that has a user profile page. At the moment the url for this page is

https://www.mywebsite.co.uk/myfolder/user.php?id=1

how do i remove the php page so it just shows

https://www.mywebsite.co.uk/myfolder/

Bearing in mind each user has a different id ?

Thanks

do a Google search on pretty url or clean url the .htaccess file take care of that.

I tried but does not work as the user id changes everytime.

As noted, an .htaccess entry should be able to handle that and only show the URL formatted as you desire.

will this still work even though the user id changes for each user ?

Why do you want to make this change?

You must have an input to the profile page that indicates who’s profile data to display. If you eliminate the user id from the url, you will be left with only the currently logged in user’s id from a session variable. This will eliminate the possibility of having public/private profile information (it will all be private) and will eliminate any current moderator/administrator ability to view/edit(reset) profile data.

Sponsor our Newsletter | Privacy Policy | Terms of Service