SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Nov 2007
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Redirect Question

    Hi, I am trying to use this redirect, but it isn't doing anything.

    PHP Code:
    RewriteRule ^directory/page.shtml?ref=testhttp://www.website.com/page.shtml?ref=test2 [R=301,L] 
    Any ideas why it doesn't work?

    Thanks

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,671
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Yes: Simply that you don't understand mod_rewrite (a RewriteRule can only examine the {REQUEST_URI} string, i.e., not the {QUERY_STRING}).

    You might benefit from reading the mod_rewrite tutorial linked in my signature as it contains explanations and sample code. It's helped may members and should help you, too.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

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