Results 1 to 13 of 13
Thread: MOD_REWRITE
Hybrid View
-
27th February 2009 13:49 #1
MOD_REWRITE
, .htaccess-a.
:
=Code:index.php?page=1&varId=1&varId2=2&varId3=3&varIdN=N
Code:/page/1/varId/1/varId2/2/varId3/3/.../varIdN/N
.htacces &page - .. , . - - .htaccess , "?" "&".
.
.
-
27th February 2009 14:39 #2
:
..Code:RewriteCond %{REQUEST_FILENAME} !-s # /a/1/b/2/index.html RewriteRule ^(.*)/(.*)(\.html)$ $2.php/$1 [L] RewriteCond %{REQUEST_FILENAME} !-s # /index.html RewriteRule ^(.*)(\.html)$ $1.php [L] RewriteCond %{REQUEST_FILENAME} !-s # (.. /a/b/v/index.html) # , php ( ) RewriteRule ^(.*)/$ index.php/$1 [L]
domain.com/var1/val1/var2/val2/index.html
,
index.php?var1=val1&var2=val2
index.html default.html default.php
... .
-
27th February 2009 14:47 #3
-
27th February 2009 15:01 #4
-
27th February 2009 15:28 #5
... . .. :
index.php?alert=
=> site.com/alert/ , .
.htaccess
Code:Options +FollowSymLinks RewriteEngine on RewriteBase / DirectoryIndex index.php RewriteCond %{REQUEST_FILENAME} !-s RewriteRule ^(.*)/$ index.php/$1 [L]
-
27th February 2009 15:38 #6Registered User
Join Date: Jul:2005
Location: Sofiq
Posts: 2,798
http://domain.com/alabal/page/1/?proba=2Code:Options +FollowSymLinks RewriteEngine on RewriteBase / DirectoryIndex index.php RewriteCond %{REQUEST_FILENAME} !-s RewriteRule ^(.*)/$ controller.php?request=$1&%{QUERY_STRING} [L]
request /alabal/page/1 . controler.php request .
-
27th February 2009 16:01 #7
-
27th February 2009 17:00 #8
-
27th February 2009 17:01 #9Registered User
Join Date: Jul:2005
Location: Sofiq
Posts: 2,798
Code:RewriteRule ^(.*)/$ controller.php?request=$1&%{QUERY_STRING} [L]
. / php .Code:RewriteRule ^(.*)/$ /controller.php?request=$1&%{QUERY_STRING} [L]
print_r($_GET);
Code:Array ( [request] => dgdgdfg/sdfgsdg )
-
28th February 2009 08:31 #10
-
4th March 2009 10:05 #11Registered User
Join Date: Jul:2005
Location: Sofiq
Posts: 2,798
-
28th February 2009 21:57 #12Banned
Join Date: Oct:2001
Location: , -5
Posts: 2,637
, . , , GET . , rewrite , , , , , . , , . , 301 Redirect. - , , , .
- .
-
4th March 2009 17:42 #13




Reply With Quote


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