Results 1 to 2 of 2

Thread: Use mod_rewrite to completely remove query string.

  1. #1
    Join Date
    Oct 2007
    Beans
    81

    Use mod_rewrite to completely remove query string.

    I have looked all over the internet and can't find any help on this subject. Everyone seems to want to rewrite the string for SEO purposes. I want search.php?search=true&value=awesome to be displayed as just search.php. But I want to try and make this site wide, for every page. Any help is most appreciated.

    Dave
    Last edited by chez17; November 4th, 2008 at 08:09 PM.

  2. #2
    Join Date
    Oct 2007
    Beans
    81

    Re: Use mod_rewrite to completely remove query string.

    I think I have made some progress but it isn't working yet. Here is what I've got:

    RewriteEngine on

    RewriteCond %{THE_REQUEST} ^GET\ /.*\;.*\ HTTP/
    RewriteCond %{QUERY_STRING} !^$
    RewriteRule .* http://mydomain.com%{REQUEST_URI}? [R=301,L]

    Can somebody take a look and let me know if I'm missing something obvious?

Tags for this Thread

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
  •