Jump to content

Recommended Posts

Well, firstly, you need a PHP script to handle grabbing the info.  If it was, for example, named profile.php, it could conventionally be accessed like so:

 

http://www.yoursite.com/profile.php?name=DarkWater

 

After you get that sorted, you can go a step further and use an Apache module named mod_rewrite.  It basically allows you to rewrite requests.  You can use it to make "pretty URLs".  It would allow you to rewrite:

http://www.yoursite.com/DarkWater

To:

http://www.yoursite.com/profile.php?name=DarkWater

 

The user would enter the first URL into their browser, and the server would actually serve back the second URL without the user needing to do anything.

Link to comment
https://forums.phpfreaks.com/topic/139385-register-help/#findComment-729041
Share on other sites

Wait.  By "the 2nd url", did you mean http://www.yoursite.com/DarkWater?  If so, then they can absolutely go directly do it.  In fact, that's the whole point of mod_rewrite.  I thought you meant the second URL of the rewriting example, which is http://www.yoursite.com/profile.php?name=DarkWater.  You had me confused there for a second, lol. 

Link to comment
https://forums.phpfreaks.com/topic/139385-register-help/#findComment-729055
Share on other sites

Easy

 

You simply create a unique ID for each user

 

Then you create one page which has all the codes

 

Therefore,

 

Lets say your site is http://www.example.com

And the page is /user/

 

So, this link

http://www.example.com/user/?ID=7663

Will open the user 7663

 

Obviously, you need to use like mySQL for all that stuff

Link to comment
https://forums.phpfreaks.com/topic/139385-register-help/#findComment-729120
Share on other sites

Search Engine Optimization...

 

Basically using ? or & or = inside of URLs ranks lower than ones that do not, simply because search engines do not like to see them Also the id is numerical, also a downside cause 99% of searches contain words not numbers.

 

Doing it with an actual username will yield higher results especially without the ? or & and = inside the query =)

Link to comment
https://forums.phpfreaks.com/topic/139385-register-help/#findComment-729139
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.