Jump to content

Clean URLs


jbog91

Recommended Posts

I'm working on this site, a community of sort, and I need some help with something I saw on some other sites. I want people to be able to access their profile by typing this is.

Instead of this:

http://www.mysite.com/profile.php?user=jbog91

I want this:
http://www.mysite.com/jbog91

I've seen many things on this but I can't seem to figure it out. I don't own the server, it's going to be shared hosting. :(
Link to comment
Share on other sites

I know you don't have to make a directory everytime someone signs up. Doesn't mod_rewrite require you to have access to some apache files that only the server admin has access too?

--Edit--
I see. Mod_rewrite doesn't require you to have access to your server's httpd.conf file. You do it through .htaccess files. I found a tutorial here.

http://www.workingwith.me.uk/articles/scripting/mod_rewrite

But it says that if I have:
www.mysite.com/profile.php?user=jbog91

I would need to have this:
www.mysite.com/profile/jbog91

What could I do to make it:
www.mysite.com/jbog91
Link to comment
Share on other sites

[quote author=jbog91 link=topic=101446.msg401701#msg401701 date=1153587349]
I know you don't have to make a directory everytime someone signs up. Doesn't mod_rewrite require you to have access to some apache files that only the server admin has access too?
[/quote]
Just make a .htaccess file.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.