Results 1 to 10 of 16

Thread: my .htaccess not working on bluehost

Hybrid View

  1. #1
    Join Date
    Jan 2008
    Posts
    13

    Default my .htaccess not working on bluehost

    I have moved from other hosting to bluehost. The htaccess files works fine on localhost and my old website. However, it doesn't work on bluehost, what's wrong?

    .htaccess:
    -----------------------------------------------------
    IndexIgnore *
    Options +FollowSymLinks
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)$ album.php?u_id=$1 [L]
    -----------------------------------------------------

    action:
    http://www.example.com/something >>> http://www.example.com/album.php?u_id=something

  2. #2
    Join Date
    Feb 2006
    Location
    Somewhere where I don't know where I am
    Posts
    2,155

    Default

    This is what I use

    Code:
    Options +FollowSymLinks
    
    RewriteEngine On
    
    RewriteCond %{SCRIPT_FILENAME} !-f
    RewriteRule   [^/]$ %{REQUEST_URI}/ [R=301,L]
    RewriteRule ^(.+)/$ index.php?p=$1        [L]
    Sign Up Now!
    Unlimited Storage, Unlimited Transfer, Host Unlimited domain names, 1 Free Domain Name
    BlueHost Features | BlueHost Help Desk | Become a BlueHost Affiliate | BlueHost CEO Blog
    (888) 401-4678 | Create a support ticket

  3. #3
    Join Date
    Jan 2008
    Posts
    13

    Default

    Thank you for your reply, but your code doesn't work for me.

    because when the link is http://www.example.com/music then the resulting link will become http://www.example.com/music/ which doesn't work for me having the "/"

  4. #4
    Join Date
    Feb 2006
    Location
    Somewhere where I don't know where I am
    Posts
    2,155

    Default

    Then remove the / in the code

    Code:
    Options +FollowSymLinks
    
    RewriteEngine On
    
    RewriteCond %{SCRIPT_FILENAME} !-f
    RewriteRule   [^/]$ %{REQUEST_URI} [R=301,L]
    RewriteRule ^(.+)/$ index.php?p=$1        [L]
    Sign Up Now!
    Unlimited Storage, Unlimited Transfer, Host Unlimited domain names, 1 Free Domain Name
    BlueHost Features | BlueHost Help Desk | Become a BlueHost Affiliate | BlueHost CEO Blog
    (888) 401-4678 | Create a support ticket

  5. #5
    Join Date
    Jan 2008
    Posts
    13

    Default

    ok i think my code and your code both work fine

    I use the temporary url: http://69.89.31.179/~example/ to test the .htacess file, my and your htacess both doesn't work!

  6. #6
    Join Date
    Feb 2006
    Location
    Somewhere where I don't know where I am
    Posts
    2,155

    Default

    can you give a real url?
    Sign Up Now!
    Unlimited Storage, Unlimited Transfer, Host Unlimited domain names, 1 Free Domain Name
    BlueHost Features | BlueHost Help Desk | Become a BlueHost Affiliate | BlueHost CEO Blog
    (888) 401-4678 | Create a support ticket

  7. #7
    Join Date
    Jan 2008
    Posts
    13

    Default

    this is my real url: http://69.89.31.179/~urfotone/


    my htacess file:
    ------------------------------------------
    IndexIgnore *
    Options +FollowSymLinks
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)$ album.php?u_id=$1 [L]
    ------------------------------------------

  8. #8
    Join Date
    Feb 2006
    Location
    Florida, USA
    Posts
    1,505

    Default

    For temp url..
    Code:
    RewriteEngine on
    RewriteBase /~urfotone/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^([^/]+)/?$ album.php?u_id=$1 [L]
    For not temp url..
    Code:
    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^([^/]+)/?$ album.php?u_id=$1 [L]

Posting Permissions

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