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
https://forums.phpfreaks.com/topic/15311-clean-urls/
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
https://forums.phpfreaks.com/topic/15311-clean-urls/#findComment-62098
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
https://forums.phpfreaks.com/topic/15311-clean-urls/#findComment-62101
Share on other sites

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.