Issue with .htaccess

Discussion in 'Apache' started by anup.mahajan, Jan 18, 2009.

  1. #1
    Hello,

    I have a custom script that uses .htaccess for redirection

    The redirection code is

    RewriteRule ^link/([/_0-9a-zA-Z-]+)$ link.php?id=$1

    The code was working fine in Hosgator, but it is not working
    in GoDaddy.

    Does GoDaddy support such redirections?

    Regards,
    Anup
     
    anup.mahajan, Jan 18, 2009 IP
  2. pageloadtime

    pageloadtime Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You need to have the mod rewrite module activated.

    check with godaddy they did that for your account.
     
    pageloadtime, Jan 19, 2009 IP
  3. diligenthost

    diligenthost Peon

    Messages:
    685
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Do you have the following in your htaccess file?
     
    diligenthost, Jan 19, 2009 IP
  4. anup.mahajan

    anup.mahajan Peon

    Messages:
    213
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yes I have

    RewriteEngine On

    Here is what I have

    RewriteEngine on
    RewriteBase /

    RewriteRule ^(.*)\.html$ index.php?pg=$1 [R]
    RewriteRule ^link/([/_0-9a-zA-Z-]+)$ link.php?id=$1 [R]
    RewriteRule ^sitemap.xml$ sitemap.php [L]
    RewriteRule ^rssfeed.xml$ rssfeed.php [L]


    Only this line of code is not working as desired.
    RewriteRule ^link/([/_0-9a-zA-Z-]+)$ link.php?id=$1 [R]

    Any ideas?

    Regards,
    Anup
     
    anup.mahajan, Jan 20, 2009 IP
  5. thuankkk

    thuankkk Active Member

    Messages:
    503
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    95
    #5
    I think it must be

    RewriteRule ^link/([/_0-9a-zA-Z\-]+)$ link.php?id=$1 [R]
     
    thuankkk, Jan 23, 2009 IP