Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 8 of 8
  1. #1
    Join Date
    May 2006
    Location
    England
    Posts
    114
    Tokens
    0

    Default changing ?profile=1 to /1

    Hiya, i'm helping with a social network site and we want it to not come with the link "blah.com/profile.php?user=$id1 but want it blah.com/1

    1 = replaces with username

    i tried editing this code

    RewriteEngine On
    Options +Followsymlinks
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.* - [L,QSA]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^.*/images/(.*)$ /images/$1 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^.*/uploads_user/(.*)$ /uploads_user/$1 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^([^/]+)/albums/([0-9]+)/([0-9]+)/?$ /album_file.php?user=$1&album_id=$2&media_id=$3 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^([^/]+)/albums/([0-9]+)/?$ /album.php?user=$1&album_id=$2 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^([^/]+)/albums/([0-9]+)/([^/]+)?$ /album.php?user=$1&album_id=$2$3 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^([^/]+)/albums/?$ /albums.php?user=$1 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^([^/]+)/blog/([0-9]+)/?$ /blog_entry.php?user=$1&entry_id=$2 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^([^/]+)/blog/([^/]+)?$ /blog.php?user=$1$2 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^([^/]+)/blog/?$ /blog.php?user=$1 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^([^/]+)/?$ /profile.php?user=$1 [L]
    I tried removing the profile.php?user= and leaving /$1 and the links change on the homepage, but when you click profiles it comes up with page not displayed for the profiles.

    thankss to who can help.

  2. #2
    Join Date
    Mar 2007
    Posts
    129
    Tokens
    0

    Default

    you could make it so it includes in index.php
    so the address bar weould look like

    www.domain.com/?profile=1
    Making PHP Scripts for Paypal can code loads of things =)

    *I'll make it show you. You pay i send

    PM me =)

  3. #3
    Join Date
    Jul 2005
    Location
    Belgium
    Posts
    2,492
    Tokens
    147

    Latest Awards:

    Default

    Quote Originally Posted by tgb-hosting View Post
    you could make it so it includes in index.php
    so the address bar weould look like

    www.domain.com/?profile=1
    That's exactly what he doesn't want...

    he wants it to be www.domain.com/1 or www.domain.com/profiles/1
    something like that.

  4. #4
    Join Date
    Jan 2006
    Location
    Kent
    Posts
    987
    Tokens
    0

    Default

    RewriteEngine on
    RewriteRule ^([^\/]+)/?$ /profile.php?user=$1 [L]

    try that, im not sure it will work :s its just in the status signature script it has that extra slash in, and that seems to work? so im not sure, just give it a go
    This is our situation and we're happy to be here,
    I wouldn't change this place for anything.


  5. #5
    Join Date
    May 2006
    Location
    England
    Posts
    114
    Tokens
    0

    Default

    Quote Originally Posted by Joe! View Post
    RewriteEngine on
    RewriteRule ^([^\/]+)/?$ /profile.php?user=$1 [L]

    try that, im not sure it will work :s its just in the status signature script it has that extra slash in, and that seems to work? so im not sure, just give it a go
    nothings different, it just changes to blah.com/username/ but the page is still page not displayed.

  6. #6
    Join Date
    Dec 2006
    Location
    Leeds
    Posts
    1,907
    Tokens
    0

    Latest Awards:

    Default

    try deleting it all and writng:


    INSERTUSERNAMEHERE[PLZ]

    Edited by --ss-- (Forum Super Moderator): Please do not post pointlessly, It is obvious that isn't a real code.
    Last edited by --ss--; 22-12-2007 at 01:46 PM.

  7. #7
    Join Date
    Jan 2006
    Location
    Kent
    Posts
    987
    Tokens
    0

    Default

    Your server does have mod_rewrite enabled yes?
    This is our situation and we're happy to be here,
    I wouldn't change this place for anything.


  8. #8
    Join Date
    May 2006
    Location
    England
    Posts
    114
    Tokens
    0

    Default

    Quote Originally Posted by Joe! View Post
    Your server does have mod_rewrite enabled yes?
    all writing permissions yes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •