Jump to content
php.lv forumi

mod_rewrite


chubiic

Recommended Posts

index.php?site=news

man vajadzētu parveidot uz index/news/

 

man viss saits ir ar tadiem linkiem piemeram index.php?site=gallery

 

un reku vel index.php?site=profile&id=2 es gribu uztaisīt uz profile/2/

 

ceru ka kāds izskaidros.. :)

 

meklēju google.lv bet nesuda nesapratu

Link to comment
Share on other sites

RewriteEngine on
RewriteRule ^.htaccess$ - [F]

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1

 

 

www.lapa.lv/lv/news/kautkas/tralaa

$_GET["url"]=lv/news/kautkas/tralala

$url=explode("/",$_GET["url"];

$url[0] bus "lv"

$url[1] bus "news"

$url[2] bus "kautkas"

$url[3] bus "tralala"

Edited by Mikijs
Link to comment
Share on other sites

RewriteEngine on
RewriteRule ^.htaccess$ - [F]

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1

 

 

www.lapa.lv/lv/news/kautkas/tralaa

$_GET["url"]=lv/news/kautkas/tralala

$url=explode("/",$_GET["url"];

$url[0] bus "lv"

$url[1] bus "news"

$url[2] bus "kautkas"

$url[3] bus "tralala"

zbis paldies Tev.. :))

Link to comment
Share on other sites

×
×
  • Create New...