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
-
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.It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ â“â“¡â“” â“ⓑⓛⓔ ⓣⓞ â“—â“”â“â“¡ !
ιη тнєσÑу, тнє ÏÑα¢тι¢є ιѕ α Ñєѕυℓт σƒ тнє тнєσÑу, вυт ιη ÏÑα¢тι¢є ιѕ тнє σÏÏσѕιтє.
-
Originally 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
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]
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]
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;
}
look at domain.com/controller/action/params
PHP 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:
PHP Code:RewriteEngine On
RewriteRule ^([^/]*)\.html$ /index.php?id=$1 [L]
Comment
Comment