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.
Wanted To Convert Php Site To Html......please help friends
Collapse
X
-
why would you want to convert from dynamic to static ?Originally posted by zong11 View PostFriends 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.キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ â“â“¡â“” â“ⓑⓛⓔ ⓣⓞ â“—â“”â“â“¡ !
ιη тнєσÑу, тнє ÏÑα¢тι¢є ιѕ α Ñєѕυℓт σƒ тнє тнєσÑу, вυт ιη ÏÑα¢тι¢є ιѕ тнє σÏÏσѕιтє.
-
sounds like he is talking about url rewriting :DOriginally posted by metulj View Postwhy would you want to convert from dynamic to static ?
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
-
create a .htacess file
if your link is like index.php?action=action&id=integer
just write
Forgot to flag sorryCode: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]
This will take alot of time in your project to rewrite everything so its better to
build your site around this
when you do this you can get the / poriton of the uri in segments, so the uri will look like thisCode: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]
domain.com/controller/action/param/param
getting individuals parts is ease
thenPHP 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; }
look at domain.com/controller/action/params
thats basically it sp u can create ur very own simple MODEL VIEW CONTROLLER FRAMEWORKPHP Code:call function $parts= getArhuments($_SERVER['REQUEST_URI']); echo "controller:".$parts[0]; echo "action:".$parts[1]; echo "params:".$parts[2];Last edited by antony2kx; 19.06.11, 13:28.
Comment
-
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
-
Replace everything in .htaccess with:
than you should be able to access the original URL of http://domain.in/index.php?id=1601 by using http://domain.in/1601.htmlPHP Code:RewriteEngine On RewriteRule ^([^/]*)\.html$ /index.php?id=$1 [L]
Comment

Comment