![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 286 Pomógł: 34 Dołączył: 4.09.2008 Skąd: Wrocław Ostrzeżenie: (0%) ![]() ![]() |
.htaccess
Kod RewriteRule ([^-]+)$ index.php?inc=$1 [L] index.php
http://localhost/art -> Array ( [inc] => index.php ) http://localhost/index.php?inc=art -> Array ( [inc] => index.php ) |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 286 Pomógł: 34 Dołączył: 4.09.2008 Skąd: Wrocław Ostrzeżenie: (0%) ![]() ![]() |
jeszcze nie mam, ale chce mieć ...
np. domena.pl/art/1 -> domena.pl/index.php?inc=art&subinc=1 Kod RewriteRule ^([a-z]+)/([0-9]+)$ index.php?inc=$1&subinc=$2 [L] RewriteRule ^([a-z]+)$ index.php?inc=$1 [L] Działa (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) PS. Dodać też RewriteCond przed RewriteRule (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) Kod RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d Ten post edytował DREEMus 15.06.2009, 15:10:53 |
|
|
![]() ![]() |
![]() |
Aktualny czas: 8.10.2025 - 15:35 |