Results 1 to 3 of 3
  1. #1
    Full Member
    Join Date
    January 18th, 2005
    Posts
    379
    All I am trying to do is change
    mydomain/category/subcategory
    to
    mydomain/products.php?parameter=category/subcategory

    It works but all my images are broken because the server keeps trying to redirect requests to the image gallery as well.

    RewriteEngine on
    RewriteCond %{REQUEST_URI} !^/images [NC]
    RewriteCond %{REQUEST_URI} !\.(jpe?g|gif|css|js|php)$ [NC]
    RewriteRule ^([^/]*)/(.*) /products.php?parameter=$1/$2 [L]

    I have some work arounds but it bugs me that I can't get this to work the way I want.

    Any ideas ?

    <hr>
    Leave the gun, take the cannolis.

  2. #2
    I like traffic lights
    Join Date
    January 18th, 2005
    Location
    Southern hemisphere - away from Fukushima
    Posts
    2,936
    Try changing

    RewriteRule ^([^/]*)/(.*) /products.php?parameter=$1/$2 [L]

    to

    RewriteRule ^/([^/]+)/(.*) /products.php?parameter=$1/$2 [L]

    ****************************
    George Orwell got the date wrong

  3. #3
    Full Member
    Join Date
    January 18th, 2005
    Posts
    379
    It's strange but the original code I posted works now. I was behind a cacheing server so I bet that was causing the problems. I was making changes but was not seeing the results of those changes.

    Thanks

    <hr>
    Leave the gun, take the cannolis.

  4. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Mod_rewrite help needed
    By zimmy in forum Programming / Datafeeds / Tools
    Replies: 4
    Last Post: April 13th, 2007, 10:53 AM
  2. mod_rewrite/.htaccess question
    By dak142 in forum Midnight Cafe'
    Replies: 6
    Last Post: July 19th, 2004, 03:19 PM
  3. UK Host with Mod_Rewrite?
    By Basil-Brush in forum Domains & Hosting
    Replies: 0
    Last Post: August 20th, 2003, 05:16 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
  •