Results 1 to 6 of 6

Help with rewrites

This is a discussion on Help with rewrites within the Off-Topic & Chit Chat forums, part of the Focus on Members category; this post is in here because this doesnt have to do with the seo plugin.... so im having issues with ...

  1. #1
    Member
    Real Name
    Vishal Patel
    Join Date
    May 2007
    Posts
    88
    Liked
    0 times

    Arrow Help with rewrites

    this post is in here because this doesnt have to do with the seo plugin....


    so im having issues with a rewrite.....i run a site where we sell remixes and i have drop down box which populates dynamically with the following code:

    index.php?act=viewCat&catId={DATA.cat_id}

    now i have this in my htaccess file:

    RewriteRule cat_(.*).html index.php?act=viewCat&catId=$1&%1 [L]
    RewriteRule cat_(.*).html index.php?act=viewCat&catId=$1 [L]

    it works fine when the link has been inserted into my templates manually, but not when using that dropdown....any ideas??

  2. #2
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,744
    Liked
    169 times
    You can redirect those URLs back to SEOed format by adding this in .htaccess:
    Code:
    RewriteCond %{QUERY_STRING} act=viewCat&catId=(.+)
    RewriteRule index\.php http://www.domain.com/cat_%1.html [L,R=301]

  3. #3
    Member
    Real Name
    Vishal Patel
    Join Date
    May 2007
    Posts
    88
    Liked
    0 times
    When I add that I get this forbidden message:

    You don't have permission to access /cat_1&act=viewCat&catId=1&act=viewCat&catId=1&act= viewCat&catId=1&act=viewCat&catId=1&act=viewCat&ca tId=1&act=viewCat&catId=1&act=viewCat&catId=1&act= viewCat&catId=1&act=viewCat&catId=1&act=viewCat&ca tId=1&act=viewCat&catId=1&act=viewCat&catId=1&act= viewCat&catId=1&act=viewCat&catId=1&act=viewCat&ca tId=1.html on this server.

    The output should be

    http://store.mysite.com/categoryName/cat_id.html

  4. #4
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,744
    Liked
    169 times
    Try to change the second line to:
    Code:
    RewriteRule index\.php http://www.domain.com/cat_%1.html? [L,R=301]

  5. #5
    Member
    Real Name
    Vishal Patel
    Join Date
    May 2007
    Posts
    88
    Liked
    0 times
    almost there, just missing the category name before the cat_id.html

  6. #6
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,744
    Liked
    169 times
    Oh, in case if you have category name in URL then you won't be able to simply redirect from original URL to it. You should contact the developer of that seo mod for the fix.

Similar Threads

  1. More rewrites
    By Lindsey in forum URL Rewrite Settings
    Replies: 6
    Last Post: 05-09-2008, 04:09 AM
  2. URL Rewrites?
    By Phooey in forum Pre-Sales Questions
    Replies: 2
    Last Post: 01-17-2007, 03:10 PM
  3. Rewrites??
    By mototips in forum General Discussion
    Replies: 2
    Last Post: 09-06-2006, 06:33 AM

Posting Permissions

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