Jump to content
php.lv forumi

mod_rewrite if un path_info


cucumber

Recommended Posts

Ir htaccess'a shadas rindas (apache 2.2.9)

RewriteEngine on
RewriteRule ^saits/(.*)/(.*)$ /saits/%{PATH_INFO}?%{QUERY_STRING} [R]

 

Ievadot dabu http://127.0.0.1/saits/111111111/22222222 ---> http://127.0.0.1/saits//22222222

 

1) kapec %{PATH_INFO} un ? zime pazud?

2) ka atcelt redirectu noteiktai adresei http://127.0.0.1/saits/bezredirekta/*?

Link to comment
Share on other sites

Ja url megina parveidot shadi it ka darbojas http://127.0.0.1/saits/111111111/22222222 -> http://127.0.0.1/saits/111111111?22222222,bet

obligats nosacijums ka jabut {PATH_INFO} un {QUERY_STRING}.

RewriteRule ^saits/(.*)/(.*)$ /saits/$1?$2 [R]

Link to comment
Share on other sites

×
×
  • Create New...