osCmax v2.5 User Manual
Results 1 to 5 of 5

DESPERATE: Need help with a mod_rewrite rule.

This is a discussion on DESPERATE: Need help with a mod_rewrite rule. within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; How do I make a URL like this... http://www.example.com/index.php?cPath=500_700 redirect to this... http://www.example.com/product-category-c-500_700.html I tried doing this rewrite, but it ...

      
  1. #1
    Member Shortbus's Avatar
    Join Date
    Jul 2010
    Posts
    56
    Rep Power
    2


    Default DESPERATE: Need help with a mod_rewrite rule.

    How do I make a URL like this...

    http://www.example.com/index.php?cPath=500_700

    redirect to this...

    http://www.example.com/product-category-c-500_700.html

    I tried doing this rewrite, but it doesn't work. I've read about 20 tutorials on this and everything I've done creates an infinite loop that won't let the page load.

    Code:
    RewriteCond %{QUERY_STRING} ^cPath=500_700$
    RewriteRule ^index\.php$ http://www.example.com/product-category-c-500_700.html? [R=301,L]

  2. #2
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: DESPERATE: Need help with a mod_rewrite rule.

    Try something like this. Going from memory, so you may need to tweak a bit:

    Redirect 301 index.php?cPath=500_700 http://www.yoursite.com/product-category-c-500_700.html
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  3. #3
    Member Shortbus's Avatar
    Join Date
    Jul 2010
    Posts
    56
    Rep Power
    2


    Default Re: DESPERATE: Need help with a mod_rewrite rule.

    Confused

    Do you mean like this...

    Code:
    RewriteRule ^index.php?cPath=500_700$ http://www.yoursite.com/product-category-c-500_700.html [R=301,L]
    That just loads almost the same URL.

    http://www.example.com/index.php?cPath=500_700 becomes
    http://www.example.com/product-category-c-500_700.html?cPath=500_700
    Last edited by Shortbus; 05-24-2011 at 07:25 PM.

  4. #4
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: DESPERATE: Need help with a mod_rewrite rule.

    No, I mean this exactly as written:
    Code:
    Redirect 301 index.php?cPath=500_700 http://www.yoursite.com/product-category-c-500_700.html
    Just change yoursite.com to your domain name. No mod_rewrite at all. Just use a straight 301 redirect in .htaccess.
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  5. #5
    Member Shortbus's Avatar
    Join Date
    Jul 2010
    Posts
    56
    Rep Power
    2


    Default Re: DESPERATE: Need help with a mod_rewrite rule.

    Nope. I put it at the very top of .htaccess and it only loads the same page -- http://www.example.com/index.php?cPath=500_700 -- no redirect.

Similar Threads

  1. paypal help!!! desperate
    By bobcast in forum Paypal
    Replies: 0
    Last Post: 10-04-2008, 10:57 PM
  2. Desperate for Help! County Sales Tax
    By marcygiff in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 01-19-2007, 11:03 AM
  3. desperate paypal flop :(
    By lil-raskals in forum osCommerce 2.2 Modification Help
    Replies: 3
    Last Post: 12-12-2004, 03:25 PM
  4. can someone please help - really stuck, getting desperate...
    By obscure in forum osCommerce 2.2 Modification Help
    Replies: 3
    Last Post: 09-20-2004, 11:55 AM
  5. Desperate - How Much????
    By LockyBoy in forum osCmax v1.7 Discussion
    Replies: 2
    Last Post: 03-04-2004, 08:11 AM

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
  •