Results 1 to 4 of 4

Problem with .htaccess redirection rule

This is a discussion on Problem with .htaccess redirection rule within the Off-Topic & Chit Chat forums, part of the Focus on Members category; Hello, I'm trying to redirect a specific page for example page.php?mysql to a URL with the Redirect Rule in .htaccess ...

  1. #1
    Junior Member
    Real Name
    Juan
    Join Date
    Dec 2008
    Posts
    28
    Liked
    0 times

    Problem with .htaccess redirection rule

    Hello,

    I'm trying to redirect a specific page for example page.php?mysql to a URL with the Redirect Rule in .htaccess this is my code:

    Code:
    RewriteEngine On
    
    Redirect /page.php?mysql http://www.google.com
    But i can't make it to work, with the above code it don't work it don't do the redirect to the page.

    What is the problem?

    Thanks

  2. #2
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    You need to escape special characters on the left, in this case, the question mark and period.

    Code:
    Redirect /page\.php\?mysql http://www.google.com

  3. #3
    Junior Member
    Real Name
    Juan
    Join Date
    Dec 2008
    Posts
    28
    Liked
    0 times
    Thanks Brian, but it didn't work i get the same problem.

  4. #4
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    try this:

    Code:
    Options +FollowSymLinks
    RewriteEngine On
    RewriteRule page\.php\?mysql http://www.google.com [R=301,L]

Similar Threads

  1. Moving the .htaccess rewrite rule
    By NickR in forum General Discussion
    Replies: 13
    Last Post: 03-23-2009, 03:32 PM
  2. htaccess rewrite rule for non vbseo page
    By Pat in forum Custom Rewrite Rules
    Replies: 10
    Last Post: 09-19-2006, 02:05 PM
  3. Redirection problem!
    By poprulz in forum Troubleshooting
    Replies: 9
    Last Post: 03-10-2006, 05:50 PM

Posting Permissions

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