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!


Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: mod_rewrite

  1. #1
    Join Date
    Aug 2006
    Location
    Manchester, UK
    Posts
    2,016
    Tokens
    141
    Habbo
    florx

    Latest Awards:

    Default mod_rewrite

    Hello there!

    I wonder if you could help me with mod_rewrite.

    I want to have any subdomain count how many people have gone to it.

    However I don't have any of the subdomains created. People can just go to random names of them and then it counts. For example:

    NAME.gotowned.com or something like that where the NAME bit is changable.

    Is this possible? I think it is as I have seen it on other sites before.

    Thanks,
    Jake

  2. #2
    Join Date
    Jul 2007
    Location
    Swindon
    Posts
    990
    Tokens
    125

    Default

    you could have yoursite.com/name this is done the following,
    if you currently have it so your usign $_get[name] eg from url like
    yoursite.com/index.php?name=bob then you would use the following,
    Code:
    Options +FollowSymLinks
    RewriteEngine On
    RewriteRule ^([A-Za-z0-9-]+)/$ index.php?name=$1 [L]
    which then would result as,
    yoursite.com/bob

    Not what you wanted but its the closest i could do.

  3. #3
    ScottDiamond. Guest

    Default

    Quote Originally Posted by Eccentric View Post
    you could have yoursite.com/name this is done the following,
    if you currently have it so your usign $_get[name] eg from url like
    yoursite.com/index.php?name=bob then you would use the following,
    Code:
    Options +FollowSymLinks
    RewriteEngine On
    RewriteRule ^([A-Za-z0-9-]+)/$ index.php?name=$1 [L]
    which then would result as,
    yoursite.com/bob

    Not what you wanted but its the closest i could do.
    He knows how to do that, thanks.

  4. #4
    Join Date
    Jul 2007
    Location
    Swindon
    Posts
    990
    Tokens
    125

    Default

    oh.. sorry.

  5. #5
    Join Date
    Jul 2007
    Location
    Scotland
    Posts
    529
    Tokens
    0

    Default

    I don't think you could do it with htaccess, simply because of the fact you do not specify the URL otherwise it wouldn't work. So if (.*) is before the url it'll look for a folder called (.*)

    (.*) = wildcard btw

  6. #6
    Join Date
    Aug 2006
    Location
    Manchester, UK
    Posts
    2,016
    Tokens
    141
    Habbo
    florx

    Latest Awards:

    Default

    Yeh I do know how to do that Thanks anyway

    Im looking for custom subdomains.

    e.g. Cheese.gotowned.com

    Where the variable cheese is sent to gotowned.php

    Can you do that with anything?

  7. #7
    Join Date
    Nov 2006
    Location
    West Yorkshire
    Posts
    2,557
    Tokens
    0

    Latest Awards:

    Default

    Ive seen that before, ive forgotten the link, n it plays a song with loads of owned pics


    YOU GOT OWNED, OWNED OWNED ETC....
    REMOVED

    Edited by jesus (Forum Super Moderator): Please do not have text in your signature which is over size 4.

  8. #8
    Join Date
    Jul 2007
    Location
    Scotland
    Posts
    529
    Tokens
    0

    Default

    WELL DONE. He's using it as an example.

  9. #9
    ScottDiamond. Guest

    Default

    Quote Originally Posted by =gamemaster= View Post
    Ive seen that before, ive forgotten the link, n it plays a song with loads of owned pics


    YOU GOT OWNED, OWNED OWNED ETC....
    This is another example.

  10. #10
    Join Date
    Dec 2006
    Location
    Hertfordshire
    Posts
    2,600
    Tokens
    0

    Latest Awards:

    Default

    Habbox.justgotowned.com


    Do you bury me when I'm gone?
    Do you teach me while I'm here?
    Just as soon as I belong, than it's time I disappear - Metallica

Page 1 of 2 12 LastLast

Posting Permissions

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