Url rewriting problem htaccess, please help

Discussion in 'PHP' started by brucelee, Sep 3, 2009.

  1. #1
    brucelee, Sep 3, 2009 IP
  2. pubdomainshost.com

    pubdomainshost.com Peon

    Messages:
    1,277
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What happened when you tried rules from other sites
    Following rule is all you need to make it work - Provided .htaccess directives are working on your site!
    
    RewriteRule ^city /index.php?area=1&cityname=newyork
    
    Code (markup):
     
    pubdomainshost.com, Sep 3, 2009 IP
  3. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #3
    Bohra, Sep 3, 2009 IP
  4. brucelee

    brucelee Active Member

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    88
    #4
    I tried both but not working well. Even i have tried the server log. I did not find any error over there too.
    I think my host doesn't support htaccess.
    but as i use rule to change all .php to .html it works and no other rule is working.
    what do you guys thinks is going wrong with my host.
    recently my site's url is
    http://mysite.info/index.php?area=1

    first rule i tried is:
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule index.php/(.*)/(.*)/$ /index.php?$1=$2

    but there is no change

    second :
    RewriteRule ^city /index.php?area=1
    i am not getting the second one.

    Any other help please?
     
    brucelee, Sep 3, 2009 IP
  5. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #5
    is this mod rewrite enabled ??
     
    Bohra, Sep 3, 2009 IP
  6. brucelee

    brucelee Active Member

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    88
    #6
    let me check it again?
     
    brucelee, Sep 3, 2009 IP
  7. brucelee

    brucelee Active Member

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    88
    #7
    Yes it is enabled.
     
    Last edited: Sep 3, 2009
    brucelee, Sep 3, 2009 IP
  8. Hanratty

    Hanratty Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} !^fun.niranvv.com$ [NC]
    RewriteRule ^(.*)$ http://fun.niranvv.com/$1 [L,R=301]





    RewriteEngine On

    RewriteCond %{HTTP_HOST} ^forum.niranvv.com$ [NC]
    RewriteRule ^(.*)$ http://fun.niranvv.com/$1 [R=301,L]
     
    Hanratty, Sep 4, 2009 IP