Godaddy - Mod_Rewrite not working

Discussion in 'Programming' started by advancedfuture, Nov 6, 2008.

  1. #1
    I can get mod rewrite to work if I want to redirect subdomains to folders no problem. But when I try to use it to make SEF urls it doesnt work for some reason. This is my .htaccess file. Am I doing something incorrect?

    
    Options FollowSymLinks
    RewriteEngine On
    RewriteRule ^(.*)\.html$ /states.php?&st=$1/ [L]
    RewriteRule ^(.*)_(.*)\.html$ /city.php?&st=$1&city=$2/ [L]
    RewriteRule ^(.*)_(.*)_(.*)\.html$ /services.php?&st=$1&city=$2&services=$3/ [L]
    RewriteBase /
    
    Code (markup):
     
    advancedfuture, Nov 6, 2008 IP
  2. sami1255

    sami1255 Well-Known Member

    Messages:
    835
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    125
    #2
    I had a same prob before.. and that was with turning on joomla sef.. that issue ended up with abandoning my godaddy hosting..

    however they say it takes time before .htaccess is activated.
     
    sami1255, Nov 6, 2008 IP
  3. sami1255

    sami1255 Well-Known Member

    Messages:
    835
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    125
    #3
    exactly.. i dont know why people like godaddy.. one of the worst control panel in the world.. running php4? hello?
     
    sami1255, Nov 8, 2008 IP
  4. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #4
    If I remember right, you have to turn off MultiViews at Godaddy.
    Options +FollowSymLinks -MultiViews
    Code (markup):
    I've never seen anyone place a RewriteBase at the bottom like that, when you use that directive it generally goes immediately after the RewriteEngine directive.

    I agree the control panel sucks. But new accounts ask whether you want PHP4 or PHP5, & you can still alter it with directives in htaccess.
     
    joebert, Nov 8, 2008 IP
  5. johno123

    johno123 Well-Known Member

    Messages:
    1,492
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    130
    #5
    i have had the same issue witrh mod rewrite and godaddy hosting, I resoloved it by phoning them and having them tell me mod rewrite was turned on by defualt in my hosting. "everythign is working here." they say.

    Then within the next 12 to 24 hrs mod rewrite misteriously works!

    Give it a shot, it may cost ya a long distance phone call to phoenix i think. But, could be worth your while in the end.


    Hope this helps!!!
     
    johno123, Nov 8, 2008 IP