Results 1 to 5 of 5
Thread: mod_rewrite.
Hybrid View
-
19th February 2008 20:21 #1
mod_rewrite.
,
, , . , . request / /index.php, /index.php?main=index, info.php /index.php?main=info. 9, , :
, , -generalized, ( URL /):Code:RewriteEngine On RewriteCond %{QUERY_STRING} !^$ RewriteCond %{QUERY_STRING} !^main=index$ RewriteCond %{QUERY_STRING} !^main=info$ RewriteRule . - [F] RewriteCond %{QUERY_STRING} ^$ RewriteRule ^/index\.php$ http://my.domain/index.php?main=index [L] RewriteCond %{QUERY_STRING} ^$ RewriteCond %{QUERY_STRING} ^main=info$ RewriteRule ^/index\.php$ info.php
, , , /info.php , /index.php?main=info index.php. /index.php?main=info info.php.Code:RewriteCond %{QUERY_STRING} ^main=(.*)$ RewriteRule index\.php %1.php
, .Last edited by Tuborgman; 19th February 2008 at 20:30.
"24 hours in a day...24 beers in a case...coincidence?"
-
19th February 2008 23:42 #2Registered User
Join Date: Aug:2006
Location: Sofia
Posts: 37
, :
RewriteEngine On
RewriteRule ^$ index.php?main=index [L]
RewriteCond $1 !^info\.php
RewriteRule ^(info)\.php index.php?main=$1 [L]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(index)\.php$ index.php?main=$1 [L]
-
20th February 2008 02:11 #3
-
20th February 2008 10:21 #4
-
20th February 2008 12:07 #5Registered User
Join Date: Jan:2004
Posts: 50
Code:RewriteRule ^(index|info).php$ index.php?main=$1




Reply With Quote

Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in