Html rewrite to php

Discussion in 'PHP' started by rajivv, Nov 30, 2010.

  1. #1
    Hi all front end links are html ( rewrite rule applied)
    (RewriteRule ^(.*)/super.html$ /super.php?show=$1)
    when clicked they show the php file.

    All is working however for one link super.html when clicked page is empty
    however if super.php opened directly it has content.

    Why is super.html showing as empty (suddenly)

    Regards
     
    rajivv, Nov 30, 2010 IP
  2. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #2
    Have you tried adding a match for just super.html

    
    RewriteRule ^(.*)/super.html$ super.php [L]
    
    Code (markup):
     
    MyVodaFone, Nov 30, 2010 IP
  3. rajivv

    rajivv Peon

    Messages:
    335
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Let me try.....
     
    rajivv, Dec 1, 2010 IP
  4. rajivv

    rajivv Peon

    Messages:
    335
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    No luck on that did not work
     
    rajivv, Dec 1, 2010 IP
  5. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #5
    Can you give us a link to where this is ?
     
    MyVodaFone, Dec 1, 2010 IP
  6. gapz101

    gapz101 Well-Known Member

    Messages:
    524
    Likes Received:
    8
    Best Answers:
    2
    Trophy Points:
    150
    #6
    it's because (.*) can return empty result
     
    gapz101, Dec 1, 2010 IP
  7. mephisto73

    mephisto73 Greenhorn

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #7
    A link would help to see what it going on...
     
    mephisto73, Dec 1, 2010 IP
  8. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #8
    If there's nothing before or after

    RewriteRule ^super.html$ super.php [L]
     
    MyVodaFone, Dec 1, 2010 IP
  9. makaleus

    makaleus Peon

    Messages:
    264
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    RewriteRule ^super.htm$^ super.php [L]
     
    makaleus, Dec 1, 2010 IP
  10. rajivv

    rajivv Peon

    Messages:
    335
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    The page is coming just no products are coming
    That is products are there on super.php but not there on super.html ( though header footer etc all is there)
     
    rajivv, Dec 1, 2010 IP
  11. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #11
    If you show us your super.php code someone can edit or advise you further...
     
    Last edited: Dec 1, 2010
    MyVodaFone, Dec 1, 2010 IP
  12. rajivv

    rajivv Peon

    Messages:
    335
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Super.php is ok ( that is page opens with header footer and all products) , its just when super.html opens its empty ( header footer ok just no products inside ( though was working before)
     
    rajivv, Dec 2, 2010 IP
  13. rajivv

    rajivv Peon

    Messages:
    335
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Hey MrVodafone sent you a PM
     
    rajivv, Dec 2, 2010 IP
  14. w47w47

    w47w47 Peon

    Messages:
    255
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    what is the super.html url?

    your_domain.com/super.html ?

    or

    your_domain.com/something/super.html ?
     
    w47w47, Dec 6, 2010 IP
  15. rajivv

    rajivv Peon

    Messages:
    335
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Solved thanks all
     
    rajivv, Dec 6, 2010 IP
  16. w47w47

    w47w47 Peon

    Messages:
    255
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #16
    thread closed.
     
    w47w47, Dec 6, 2010 IP