Jump to content

Register Help


phpisawesome

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
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
Share on other sites

@npsari: He wants to mod_rewrite by username, not just make a folder with an index.php that handles requests.  That's like, makeshift mod_rewriting. =P

 

That and he probably wants it to be SEO Friendly. The ? is not very SEO friendly =)

Link to comment
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
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.