Wanted To Convert Php Site To Html......please help friends

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Wanted To Convert Php Site To Html......please help friends

    Friends i want to convert my site from php to html. So please tell me how to convert this in to html. I am using sea script.

    #2
    Originally posted by zong11 View Post
    Friends i want to convert my site from php to html. So please tell me how to convert this in to html. I am using sea script.
    why would you want to convert from dynamic to static ?
    It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
    ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
    ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
    キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

    Comment


      #3
      Originally posted by metulj View Post
      why would you want to convert from dynamic to static ?
      sounds like he is talking about url rewriting :D

      Free Mobile Web Scripts by me: Free Youtube Downloader, Tweets Reader, Facebook Wall Posts Reader
      PHP Tutorials: How to Secure Your PHP Script (PHP SECURITY)
      Want to Develop/Edit your WAP/Web Site? Add me to Gtalk (gmail) 'lakshan1989' or PM me.

      Comment


        #4
        Friends i just want to convert links in to html.....so hw can i do that???? As like index.php?id=4489 --------> /Games-Zone/1.html please help....
        Last edited by zong11; 19.06.11, 12:53.

        Comment


          #5
          create a .htacess file

          if your link is like index.php?action=action&id=integer

          just write

          Code:
          RewriteEngine on
          
          
          RewriteRule ^/index.php?action=([a-zA-Z0-9\_\-\+]+)&id=([0-9]+) /content/$1/$2.html [L]
          RewriteRule ^/index.php?action=([a-zA-Z0-9\_\-\+]+)&id=([0-9]+[\.html]) /content/$1/$2 [l]
          RewriteRule ^/index.php?action=([a-zA-Z0-9\_\-\+]+)&id=([0-9]+) /content/$1/$2 [l]
          Forgot to flag sorry


          This will take alot of time in your project to rewrite everything so its better to

          build your site around this

          Code:
          Options +FollowSymLinks
          IndexIgnore */*
          RewriteEngine on
          
          # if a directory or a file exists, use it directly
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteCond %{REQUEST_FILENAME} !-d
          
          # otherwise forward it to index.php
          RewriteRule . index.php
          
          RewriteCond %{HTTP_HOST} ^domain.com/ [NC]
          RewriteRule ^(.*)$ http://domain.com/$1 [L,R=301]
          when you do this you can get the / poriton of the uri in segments, so the uri will look like this

          domain.com/controller/action/param/param

          getting individuals parts is ease


          PHP Code:

          function getArguments($uri)
          {
             
          $url_array = array();
             
          $uri trim($uri);

             
          $args explode("/"$uri);
            
          array_shift($args// removes first element from array empty
             
          foreach($arg as $a)
             {
                if(
          preg_match("/^([a-zA-Z\-\_\+]+)$/"$a))
               {
                  
          push($a$url_array);
               }

           }

          return 
          $url_array;


          then

          look at domain.com/controller/action/params

          PHP Code:

          call 
          function

          $partsgetArhuments($_SERVER['REQUEST_URI']);

          echo 
          "controller:".$parts[0];
          echo 
          "action:".$parts[1];
          echo 
          "params:".$parts[2]; 
          thats basically it sp u can create ur very own simple MODEL VIEW CONTROLLER FRAMEWORK
          Last edited by antony2kx; 19.06.11, 13:28.

          Comment


            #6
            No friend not working..... all links are like http://domain.in/index.php?id=1601 and wanted to convert to html.
            Last edited by zong11; 19.06.11, 13:36.

            Comment


              #7
              Sorry bro i cant help you anymore just go read up url rewriting

              Comment


                #8
                Search for mod_rewrite in here or google
                Did I help you?
                You can help me too
                Your donations will help me finance my studies.

                Comment


                  #9
                  Replace everything in .htaccess with:

                  PHP Code:
                  RewriteEngine On
                  RewriteRule 
                  ^([^/]*)\.html$ /index.php?id=$[L
                  than you should be able to access the original URL of http://domain.in/index.php?id=1601 by using http://domain.in/1601.html

                  Comment

                  Working...
                  X