PHP Help - Redirect PHP

Discussion in 'PHP' started by outanmax, Nov 27, 2012.

  1. #1
    [COLOR=#111111]So, I have create a wordpress site to showcase blogger & wordpress themes. Now I need to setup a Live Demo & Download links. Clicking on "Live Demo" user will go to iframe with topbar (example here: [/COLOR][URL]http://jsfiddle.net/EB6gN/34/[/URL][COLOR=#111111]). [/COLOR]
    
    [COLOR=#111111]But how can I add a subdirectory/url for a demo?[/COLOR]
    
    [B][I]This is that I want:[/I]
    
    Post URL: mysite.com/post-name.html
    DEMO URL: mysite.com/post-name.html[B]/demo/ - this is that I want.
    
    [I][B]Live Example:[/B]
    
    Post URL: [URL="http://btemplates.com/2012/blogger-template-modern-cars/"]http://btemplates.com/2012/blogger-t...e-modern-cars/[/URL]
    DEMO URL: [URL="http://btemplates.com/2012/blogger-template-modern-cars/demo/"]http://btemplates.com/2012/blogger-t...ern-cars/demo/[/URL][/I][/B][/B]
    Code (markup):
    I think, I need to make a demo folder in my public_htm folder and add a php file with some if-else, check the currently selected demo and pass it .... and load the code inside the matching if-else if block.. Please, could someone help me please to make php file? Or to help me make a live demo (using iframe) for my themes?
     
    outanmax, Nov 27, 2012 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #2
    why adding /demo/ to a url that ends with .html? it doesn't make sense?
     
    EricBruggema, Nov 28, 2012 IP
  3. outanmax

    outanmax Banned

    Messages:
    99
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #3
    What you mean? More info please
     
    outanmax, Nov 28, 2012 IP
  4. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #4
    I don't have knowledge from Wordpress but the thing you are trying to achieve isn't going to work.

    Please write in full detail what you have, what you want and what you could not get done by yourself.
     
    EricBruggema, Nov 28, 2012 IP
  5. outanmax

    outanmax Banned

    Messages:
    99
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #5
    I just need a good and working demo link for my blogger & wordpress themes. Just check btemplates.com, premiumbloggertemplates.com as example.
     
    outanmax, Nov 28, 2012 IP
  6. davetrebas

    davetrebas Active Member

    Messages:
    301
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    78
    #6
    Looked at your site.

    There are several add-ins that will allow php code in pages/posts if you want to do that.

    I agree with EricBouggema (above). Normally html is not a folder/directory like you are using it. It's usually a file.

    You have access to all the php that is used for the wp page. You can edit it if you are careful and know what you are doing.

    It's (WordPress) all just php with a special .htaccess file and mySQL.

    You might (IMHO) be better off paying someone to do what you want
     
    davetrebas, Nov 28, 2012 IP
  7. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #7
    WordPress can be used to do almost anything, but one thing it's really bad at is doing template demo sites. As davetrebas sais, you'd probably be better off having someone write a template demo site for you, and linking to that site for demos. The WP link can tell the demo site which template to demo and the link going back to the WP site can go back to the page it came from.
     
    Rukbat, Nov 30, 2012 IP
  8. yakuzaemme

    yakuzaemme Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    What you want to do is edit the htaccess. Google around and find some guide easy enough for you to follow. Or you can achieve it with the folder structure (e.g main folder is mywebsite, and it has a folder called demo which has the demo site, and an index.php). This way you call mydomain.com/mywebsite/demo, note that this isn't the correct way though.
     
    yakuzaemme, Dec 2, 2012 IP
  9. kasun0777

    kasun0777 Well-Known Member

    Messages:
    355
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    138
    #9
    cant understand what you are saying.
     
    kasun0777, Dec 2, 2012 IP
  10. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #10
    Editing the .htaccess file isn't the correct way at all. That's not what it's for.
     
    Rukbat, Dec 2, 2012 IP
  11. ratan1980

    ratan1980 Member

    Messages:
    46
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    28
    #11
    you can add demo to site instead of adding it after html file.
     
    ratan1980, Dec 2, 2012 IP