htaccess redirect problem

Discussion in 'PHP' started by rekha, Oct 16, 2008.

  1. rekha

    rekha New Member

    Joined:
    Jan 17, 2008
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    0
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    here is what you should be doing
    Code:
    ## Only apply for one folder
    RewriteCond %{HTTP_HOST} yoursite\.com/\/folder\/$ [NC]
    RewriteRule ^([A-Za-z\.]+)$ http://yoursite.com/folder/content.php?url=$1 [QSA,L]
    
     
  3. rekha

    rekha New Member

    Joined:
    Jan 17, 2008
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    0
    Thanks for your reply.But still it is not working.
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    What is the error?
     
  5. rekha

    rekha New Member

    Joined:
    Jan 17, 2008
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    No error occurs.The file is not redirecting.

    Pls help...

    Regards
    Rekha
     
  6. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Does your web server support .htaccess and if yes how you know it?
     
  7. rekha

    rekha New Member

    Joined:
    Jan 17, 2008
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    Yes.If i enter some strings in .htaccess file and run it i am getting internal server error.This means that the server is supporting htaccess.
     
  8. rekha

    rekha New Member

    Joined:
    Jan 17, 2008
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    Pls solve this issue...
     
  9. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Try redirecting your domain to say google and see if it works
     
  10. rekha

    rekha New Member

    Joined:
    Jan 17, 2008
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    0
    Thanks for ur reply after a long time.When i redirect to some other domain it is working.The issue is when i redirect it to the file which was also in the same folder.This is the problem.


    Regards
    Rekha
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice