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 11
  1. #1
    Join Date
    Mar 2008
    Location
    UK. America sucks!
    Posts
    310
    Tokens
    0

    Default directory style URLs htaccess help?

    I really need to change my URLs to directory style ones.

    What is the HTACCESS code to change
    mysite.com/product20392.php
    to
    mysite.com/product20392
    ?

    Regards
    Jake

    if PHP is peanut butter...then...MySQL would be the jelly. Together they can make one heck of a good sandwich.

  2. #2
    Join Date
    Jul 2004
    Location
    Scotland
    Posts
    17,702
    Tokens
    60,948
    Habbo
    Habbic

    Latest Awards:

    Default

    RewriteCond %{THE_REQUEST} ^GET\ (.*)\.php\ HTTP
    RewriteRule (.*)\.php$ $1 [R=301]

    ?

  3. #3
    Join Date
    Mar 2008
    Location
    UK. America sucks!
    Posts
    310
    Tokens
    0

    Default

    How can I then make it pull content from /product20392.php ?

    if PHP is peanut butter...then...MySQL would be the jelly. Together they can make one heck of a good sandwich.

  4. #4
    Join Date
    Jul 2004
    Location
    Scotland
    Posts
    17,702
    Tokens
    60,948
    Habbo
    Habbic

    Latest Awards:

    Default

    I ain't got hosting atm so i can't test this but try;

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME}!-d
    RewriteCond %{REQUEST_FILENAME}!-f
    RewriteRule ^([^.]+)\.php$ $1 [L]

  5. #5
    Join Date
    Mar 2008
    Location
    UK. America sucks!
    Posts
    310
    Tokens
    0

    Default

    with or without the code before?
    500 error too

    if PHP is peanut butter...then...MySQL would be the jelly. Together they can make one heck of a good sandwich.

  6. #6
    Join Date
    Jul 2004
    Location
    Scotland
    Posts
    17,702
    Tokens
    60,948
    Habbo
    Habbic

    Latest Awards:

    Default

    Without

  7. #7
    Join Date
    Mar 2008
    Location
    UK. America sucks!
    Posts
    310
    Tokens
    0

    Default

    500 error.

    if PHP is peanut butter...then...MySQL would be the jelly. Together they can make one heck of a good sandwich.

  8. #8
    Join Date
    Jul 2004
    Location
    Scotland
    Posts
    17,702
    Tokens
    60,948
    Habbo
    Habbic

    Latest Awards:

    Default

    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}\.php -f
    RewriteRule ^(.*)$ $1.php

    ^ without previous code.

  9. #9
    Join Date
    Mar 2008
    Location
    UK. America sucks!
    Posts
    310
    Tokens
    0

    Default

    It's not removing .php!

    But it pulls content.

    if PHP is peanut butter...then...MySQL would be the jelly. Together they can make one heck of a good sandwich.

  10. #10
    Join Date
    Jul 2004
    Location
    Scotland
    Posts
    17,702
    Tokens
    60,948
    Habbo
    Habbic

    Latest Awards:

    Default

    omg >.< 1 sec


    Is this on btw?

    Options +FollowSymLinks

    (at top)
    Last edited by scottish; 02-10-2008 at 09:18 PM.

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
  •