Page 1 of 2 1 2 LastLast
Results 1 to 15 of 17
Like Tree4Likes

htaccess help

This is a discussion on htaccess help within the Off-Topic & Chit Chat forums, part of the Focus on Members category; I know some people on here are really good with htaccess. I am fixing to switch out software on my ...

  1. #1
    Senior Member
    Real Name
    chance
    Join Date
    Aug 2006
    Posts
    260
    Liked
    2 times

    htaccess help

    I know some people on here are really good with htaccess.
    I am fixing to switch out software on my shopping cart. I was seeing if there is a way to do this.


    I need this old inbound link forwarded to below
    I have all the id numbers matching from the new software to the old software.

    I really apreciate anyones help.

  2. #2
    vBSEO Staff Andrés Durán Hewitt's Avatar
    Real Name
    Andrés Durán
    Join Date
    Jul 2009
    Location
    Costa Rica
    Posts
    3,393
    Liked
    411 times
    Blog Entries
    1
    Hello,

    Both URLs seem to be the same. What do you exactly need to redirect?.
    Andrés Durán / Crawlability Inc.
    ˇvBSEO 3.6.0 GOLD Liberado!
    Inaugurando el NUEVO vBSEO Sitemap Generator 3.0. - ˇAHORA disponible para Clientes de vBSEO!

    Síguenos en: Facebook | Síguenos en: Twitter


  3. #3
    Senior Member
    Real Name
    chance
    Join Date
    Aug 2006
    Posts
    260
    Liked
    2 times
    I need the ID number to be in the back of the url product-X vers being X-product

  4. #4
    vBSEO Staff Andrés Durán Hewitt's Avatar
    Real Name
    Andrés Durán
    Join Date
    Jul 2009
    Location
    Costa Rica
    Posts
    3,393
    Liked
    411 times
    Blog Entries
    1
    I see now.

    You can try:

    RewriteRule ^(.+)-([0-9]+)\.html$ http://www.devilsowninjection.com/$2-$1.html [L]
    Andrés Durán / Crawlability Inc.
    ˇvBSEO 3.6.0 GOLD Liberado!
    Inaugurando el NUEVO vBSEO Sitemap Generator 3.0. - ˇAHORA disponible para Clientes de vBSEO!

    Síguenos en: Facebook | Síguenos en: Twitter


  5. #5
    Senior Member
    Real Name
    chance
    Join Date
    Aug 2006
    Posts
    260
    Liked
    2 times
    works like a charm thank you very much with this i should be able to do the other pages like catagorys etc. I spend a very long time trying to do this before asking. I see my issue was i trying to use 1 var and move it not make both a var and swap them.

  6. #6
    vBSEO Staff Andrés Durán Hewitt's Avatar
    Real Name
    Andrés Durán
    Join Date
    Jul 2009
    Location
    Costa Rica
    Posts
    3,393
    Liked
    411 times
    Blog Entries
    1
    You're welcome!
    Andrés Durán / Crawlability Inc.
    ˇvBSEO 3.6.0 GOLD Liberado!
    Inaugurando el NUEVO vBSEO Sitemap Generator 3.0. - ˇAHORA disponible para Clientes de vBSEO!

    Síguenos en: Facebook | Síguenos en: Twitter


  7. #7
    Senior Member
    Real Name
    chance
    Join Date
    Aug 2006
    Posts
    260
    Liked
    2 times
    Well i finaly got around to putting this site live and got 1 more issue if you could be so kind to help

    If i put your httaccess entry infront of this entry below thats already in the httaccess yours works perfect and all the old urls foward. But some products urls for the new site have numbers at the end. 305-dvc-30-stage-2.html
    which on the old system would have been dvc-30-stage-2-305.html. The New url has some issues and it not even accessable from the new sites url structer either. Kinda like there is something fighting each other there.


    RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$1 [QSA,L]

    If i put yours after than the site works as it normal does but my old urls don't foward.

    I would greaty aprecate your help.

  8. #8
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    This is why vbseo uses "-a" on the end of any thread titles that end in a number.

    There's really no good way to work these. I would suggest re-naming the thread/post/url so that numbers don't exist at the end.

  9. #9
    vBSEO Staff Andrés Durán Hewitt's Avatar
    Real Name
    Andrés Durán
    Join Date
    Jul 2009
    Location
    Costa Rica
    Posts
    3,393
    Liked
    411 times
    Blog Entries
    1
    Hello,

    Brian is right, though this setup could work:

    RewriteCond %{REQUEST_URI} !^[0-9]+-.*-[0-9]+\.html
    RewriteRule ^(.+)-([0-9]+)\.html$ http://www.devilsowninjection.com/$2-$1.html [L]
    RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$1 [QSA,L]
    Andrés Durán / Crawlability Inc.
    ˇvBSEO 3.6.0 GOLD Liberado!
    Inaugurando el NUEVO vBSEO Sitemap Generator 3.0. - ˇAHORA disponible para Clientes de vBSEO!

    Síguenos en: Facebook | Síguenos en: Twitter


  10. #10
    Senior Member
    Real Name
    chance
    Join Date
    Aug 2006
    Posts
    260
    Liked
    2 times
    Thanks I just added an a to the end and now it works

  11. #11
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    I love the easy way out

  12. #12
    Senior Member
    Real Name
    chance
    Join Date
    Aug 2006
    Posts
    260
    Liked
    2 times
    this htaccess stuff is confusing me.
    if this works

    RewriteRule ^(.+)-([0-9]+)\.html$ http://www.devilsowninjection.com/$2-$1.html [L]
    for
    /self-sealing-bulk-head-243.html
    /243-self-sealing-bulk-head.html
    what am i doing wrong, i honesty trying to figure this out.
    RewriteRule ^en/(.+)-([0-9]+)$ http://www.devilsowninjection.com/$2-$1 [L]
    for
    /water-injection-kits-2/
    /en/2-water-injection-kits/
    Is there something i can use to echo the output My site just takes me to the 404 page so i cant see what its putting up for an output.

  13. #13
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    You're missing the trailing slash

    RewriteRule ^en/(.+)-([0-9]+)/$ http://www.devilsowninjection.com/$2-$1/ [L]

  14. #14
    Senior Member
    Real Name
    chance
    Join Date
    Aug 2006
    Posts
    260
    Liked
    2 times
    yea i tried it that way with the / it didn't work figured i was doing something else wrong.

  15. #15
    Senior Member
    Real Name
    chance
    Join Date
    Aug 2006
    Posts
    260
    Liked
    2 times
    figured it out. if i get ride of the /en it works some of the other htaccess stuff was adding the /en automaticly


    just curious can you add or subtract in the htaccess file ?

    I goofed i need. I can't belive i did that one.

    /water-injection-kits-2/
    /en/3-water-injection-kits/

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 8
    Last Post: 12-14-2010, 12:51 PM
  2. Replies: 2
    Last Post: 12-24-2009, 04:52 AM
  3. Moving .htaccess rules to htaccess.conf
    By petforums in forum General Discussion
    Replies: 2
    Last Post: 06-07-2009, 12:42 PM
  4. Replies: 5
    Last Post: 05-12-2009, 03:29 PM
  5. .htaccess in forum root w/ exisiting .htaccess?
    By OttoBomb in forum Troubleshooting
    Replies: 5
    Last Post: 07-03-2007, 03:45 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
  •