Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Pomoć oko rewrite url-a

[es] :: Linux/UNIX serveri i servisi :: Pomoć oko rewrite url-a

[ Pregleda: 1470 | Odgovora: 0 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

Wizard4U
Wizard4U

Član broj: 178049
Poruke: 122
*.adsl.net.t-com.hr.



Profil

icon Pomoć oko rewrite url-a11.07.2008. u 12:49 - pre 192 meseci
dobio sam dolje navedeni kod za .htaccess, ali ga ne znam prilagoditi sebi!
Npr. dvije vrste adrese(linka) koje imam su:
[url]http://localhost/category.php?category_id=12[/url]
[url]http://localhost/category.php?category_id=12&naselje_id=2[/url]
Code:

<IfModule mod_rewrite.c>
# enable rewriting
RewriteEngine on

# -=* make sure to change RewriteBase to valid root folder *=-
RewriteBase /

# exclude these directories from rewriting
RewriteRule ^(images|banners).*$ - [QSA,NC,L]

# if requested HTML list-file does not exist, serve it to index (.html part is stipped from the file name)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^/(.+)/index-[0-9]+\.html?$ [NC]
RewriteRule ^(.+)/index-([0-9]+)\.html?$ index.php?uri=$1&page=$2 [QSA,NC,L]

# if requested file/directory does not exist, and is not in one of data directories, serve it to index
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?uri=$1 [QSA,NC,L]
</IfModule>

zamolio bih dobre duše da mi pomognu jer sam pregledavao razno-razne tutorijale i nikako ne mogu skužiti a znam da nije prekomplicirano!
Hvala unaprijed


[Ovu poruku je menjao Wizard4U dana 11.07.2008. u 14:08 GMT+1]
 
Odgovor na temu

[es] :: Linux/UNIX serveri i servisi :: Pomoć oko rewrite url-a

[ Pregleda: 1470 | Odgovora: 0 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.