Can I do this with htaccess, rewrite <br> to <br />

Discussion in 'Apache' started by Colleen, May 16, 2006.

  1. #1
    If there's a way to get htaccess to write any <br> to <br /> please let me know.

    It's coming in from an rss feed that way and the script I'm using is encrypted so I can't do much and I need the tags to be <br /> for validation purposes. ;)
     
    Colleen, May 16, 2006 IP
  2. fsmedia

    fsmedia Prominent Member

    Messages:
    5,163
    Likes Received:
    262
    Best Answers:
    0
    Trophy Points:
    390
    #2
    As far as I know, that would have to be a php preg_replace type thing, not .htaccess...
     
    fsmedia, May 16, 2006 IP
  3. Colleen

    Colleen Illustrious Member

    Messages:
    6,777
    Likes Received:
    725
    Best Answers:
    1
    Trophy Points:
    430
    #3
    Thanks, any idea how I go about doing that?
     
    Colleen, May 16, 2006 IP
  4. fsmedia

    fsmedia Prominent Member

    Messages:
    5,163
    Likes Received:
    262
    Best Answers:
    0
    Trophy Points:
    390
    #4
    I don't know the specifics, but someone else does I'm sure. I just know that's probably how you will get it accomplished...good luck with it :)
     
    fsmedia, May 16, 2006 IP
  5. Colleen

    Colleen Illustrious Member

    Messages:
    6,777
    Likes Received:
    725
    Best Answers:
    1
    Trophy Points:
    430
    #5
    Well I think this is a start:

    $string = "<br>";
    echo str_replace(" <br>", " <br />", $string);

    Just have to figure out which file to place it in.
     
    Colleen, May 16, 2006 IP
  6. FeelLikeANut

    FeelLikeANut Peon

    Messages:
    330
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #6
    This is a unique situation. I'm not sure PHP or .htaccess will help you here. Your best solution may be to decrypt the script -- I'm certain it can be done -- then make any changes you need. If you upload the encrypted script as an attachment, we could work on decrypting it for you.
     
    FeelLikeANut, May 17, 2006 IP
  7. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Or get another feed sucker, replace the tags with it, and let the encrypted feed gatherer suck in the altered feed from the new feed script. Get it?
     
    T0PS3O, May 17, 2006 IP
  8. Colleen

    Colleen Illustrious Member

    Messages:
    6,777
    Likes Received:
    725
    Best Answers:
    1
    Trophy Points:
    430
    #8
    It's over my head, I don't know much about feeds. I think I will write the person I bought the script from and ask him if he can fix it then encrypt it again. Thanks guys.
     
    Colleen, May 17, 2006 IP
  9. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I meant this...

    [Your encrypted gatherer] -> (pulls feed from) -> URL www.domain.com/rss.xml

    My solution:

    [Open Source gatherer] -> (pulls feed from) -> URL www.domain.com/rss.xml
    [Open Source gatherer does the str_trplace and outputs RSS on url yourdomain.com/rss.xml]
    [Your encrypted gatherer] -> (pulls feed from) -> URL www.yourdomain.com/rss.xml

    Done. But longwinded.
     
    T0PS3O, May 17, 2006 IP
  10. Colleen

    Colleen Illustrious Member

    Messages:
    6,777
    Likes Received:
    725
    Best Answers:
    1
    Trophy Points:
    430
    #10
    Ok, I will try it and see where I get. My encrypted file is named rss.php, I've attached it, not sure it will help.
     

    Attached Files:

    • rss.php
      File size:
      5.3 KB
      Views:
      168
    Colleen, May 17, 2006 IP