Results 1 to 5 of 5
  1. #1
    ABW Ambassador Georgie Peri's Avatar
    Join Date
    January 18th, 2005
    Location
    Norwalk, CT
    Posts
    846
    Exclamation URL Rewrite expert needed
    So I have uncovered a serious issue with my dynamic pages .. ugh ..

    and i just installed a URL rewrite program but the regular expressions is killin me ..

    can someone who has experience lend a hand?

    Just need like 2 examples, and ill prob be able to figure out the other pages

    ~~~

    articles.asp?id=76&title=Wood%20Working%20/%20Wood%20Repair
    would want it to show up as
    articles/id-76-title/Wood-Working-Wood-Repair

    news.asp?id=774&title=Prescriptives%20coupons,%20free%20shipping,%20product%20deals!
    want it to show up as
    news/id-774/title/Prescriptives-coupons-free-shipping-product-deals!
    OpA! Giasou Ti kanies!

  2. #2
    Grandma broke her coccyx! Uncle Rico's Avatar
    Join Date
    May 8th, 2007
    Location
    North Carolina
    Posts
    2,238
    Here is my first un-tested attempt. Not sure about the "id-([0-9]+)-title" part, but there are better ways to handle it. Not sure why you wouldn't make the url look like this "articles/76/Wood-Working-Wood-Repair" and drop the "id- -title" part of it.

    And I am no expert on mod rewrite...

    Code:
    articles.asp?id=76&title=Wood%20Working%20/%20Wood%20Repair
    would want it to show up as
    articles/id-76-title/Wood-Working-Wood-Repair
    
    RewriteRule  ^articles/id-([0-9]+)-title/(.*)/?$ articles.asp?id=$1&title=$2  [L]
    
    
    news.asp?id=774&title=Prescriptives%20coupons,%20free%20shipping,%20product%20deals!
    want it to show up as
    news/id-774/title/Prescriptives-coupons-free-shipping-product-deals!
    
    RewriteRule  ^news/id-([0-9]+)/title/(.*)/?$ news.asp?id=$1&title=$2  [L]

  3. #3
    ABW Ambassador Georgie Peri's Avatar
    Join Date
    January 18th, 2005
    Location
    Norwalk, CT
    Posts
    846
    your right .. i shouldnt have that ID / Title either !!


    I'm just getting started with rewrites .. i got alot to learn!


    I can only wish someone told me to do rewrites a longggggggg time ago ..


    Then again .. ive been getting traffic with my Super ugly long Urls .. now with the shorter cleaner verison -- who knows what will happen!
    OpA! Giasou Ti kanies!

  4. #4
    Grandma broke her coccyx! Uncle Rico's Avatar
    Join Date
    May 8th, 2007
    Location
    North Carolina
    Posts
    2,238
    Quote Originally Posted by Magi
    your right .. i shouldnt have that ID / Title either !!


    I'm just getting started with rewrites .. i got alot to learn!
    In that case, how about this then...

    Code:
    articles.asp?id=76&title=Wood%20Working%20/%20Wood%20Repair
    would want it to show up as
    articles/76/Wood-Working-Wood-Repair
    
    RewriteRule  ^articles/([0-9]+)/(.*)/?$ articles.asp?id=$1&title=$2  [L]
    
    
    news.asp?id=774&title=Prescriptives%20coupons,%20free%20shipping,%20product%20deals!
    want it to show up as
    news/774/title/Prescriptives-coupons-free-shipping-product-deals!
    
    RewriteRule  ^news/([0-9]+)/title/(.*)/?$ news.asp?id=$1&title=$2  [L]

  5. #5
    ABW Ambassador Georgie Peri's Avatar
    Join Date
    January 18th, 2005
    Location
    Norwalk, CT
    Posts
    846
    Thanks alot Mr Butts

    smacks that ***
    OpA! Giasou Ti kanies!

  6. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. SEO expert needed
    By BrianScott in forum Midnight Cafe'
    Replies: 3
    Last Post: February 18th, 2005, 10:30 AM
  2. CSS expert needed
    By Haiko de Poel, Jr. in forum Midnight Cafe'
    Replies: 2
    Last Post: January 21st, 2005, 09:13 AM
  3. Expert needed
    By deano6410 in forum Introduce Yourself
    Replies: 3
    Last Post: December 31st, 2004, 10:25 AM
  4. URL ReWrite Question
    By dak142 in forum Midnight Cafe'
    Replies: 4
    Last Post: August 11th, 2004, 12:02 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
  •