.htaccess redirect help

Posted on 2011-04-19
Last Modified: 2012-05-11

I want to redirect

I have tried loads of variations but cant find one that works.

Thanks, Joe
Question by:joe90kane
    LVL 9

    Expert Comment

    LVL 1

    Author Comment

    Yep doesnt work

    That works when redirecting a .html page but not the ?tkey=475
    LVL 2

    Accepted Solution

    create a file named .htaccess in the directory containing following lines:

    RewriteEngine On
    RewriteCond %{QUERY_STRING} ^tkey\=475$
    RewriteRule ^products_display\.php$ /products

    mod_rewrite is a very powerful tool to perform virtually any kind of url manipulation. Please take attention that you can not use Query_string directly in your RewriteRule. Instead you have to use RewriteCond as shown in the example
    RewriteEngine On
    RewriteCond %{QUERY_STRING} ^tkey\=475$
    RewriteRule ^products_display\.php$ /products

    Open in new window

    LVL 1

    Author Comment

    That worded perfectly.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
    A few customers have recently asked my thoughts on Password Managers.  As Security is a big part of our industry I was initially very hesitant and sceptical about giving a program all of my secret passwords.  But as I was getting asked about them mo…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now