Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Nov 2005
    Posts
    66
    Thanks
    8
    Thanked 0 Times in 0 Posts

    .htaccess 301 Redirects with Dynamic URL

    I have this:
    Code:
    http://www.example.com/toolkits.php?t=15
    And I need it to be 301 redirected to:
    Code:
    http://www.example.com/toolkits/grammar-toolkit.html
    How can I achieve this in my .htaccess?

    Thank you for your help! Desperately needed!

  2. #2
    Regular Coder poyzn's Avatar
    Join Date
    Nov 2010
    Posts
    266
    Thanks
    2
    Thanked 61 Times in 61 Posts
    try this code
    Code:
    RewriteEngine On
    RewriteCond %{REQUEST_URI} ^\/toolkits\.php\?t=15$
    RewriteRule . /toolkits/grammar-toolkit.html [L,R=301]


 

Posting Permissions

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