Jump to content
php.lv forumi

.htaccess problēmas


Blady

Recommended Posts

Uzlika man viens gudrinieks saitu, bet sākās brīnumi, cilvēks ierakstot pilno adresi, vietni redz, gribēju to nosubmitot meklēšanas dzinējā skripts atgriež 500 erorru, viens programmētājs teica,  ka tas varētu bbūt tādēļ ka php ir cgi režīmā šobrīd, un pareizi būtu jāizveido.htaccess failu. Izdzēsu rindiņas kuras sākās ar php_flag problēma palika. A ko tālāk darīt nezinu. Neesmu programmētājs, tāpēc arī problēmas apraksts tāds, kāds tas ir.

Link to comment
Share on other sites

te arī pats htaccess

 

Options -Indexes
AddDefaultCharset utf-8
php_flag magic_quotes_gpc off
php_flag allow_call_time_pass_reference on
php_flag short_open_tag on

RewriteEngine On
#Options +FollowSymLinks
RewriteBase /


RewriteCond %{HTTP_HOST} ^www\.(.+)$  [NC]
RewriteRule ^(.*) http://%1/$1 [L,R=301]

#<SOCIAL_SHOPPING PLUGIN>
RewriteRule ^([a-z0-9]+)/action([0-9]*).html$ /index.php?show=action&action_id=$2&hash=$1
#</SOCIAL_SHOPPING PLUGIN>

RewriteRule ^api/(.*) extension/api/frapi/public/index.php$1
RewriteRule ^check|result(.*)$ extension/public_api/connect.php$1
RewriteRule ^coupons/(.*)-(.*)$ extension/public_api/connect.php?code=$1&pin=$2

RewriteRule ^([0-9]+)\.html$ index.php?show=referal&id=$1
RewriteRule ^activate/([a-zA-Z0-9]+)$ /index.php?act=activate&md=$1
RewriteRule ^my/$ /index.php?show=my&subshow=startpage
RewriteRule ^my/err$ /index.php?show=my&err=1
RewriteRule ^my/activatemail/$ /index.php?show=my&subshow=activatemail
RewriteRule ^my/users/(.*)/$ /index.php?show=my&subshow=users&username=$1
RewriteRule ^my/activate/success/$ /info.php?act=activate&type=1
RewriteRule ^my/activate/fail/$ /info.php?act=activate&type=2
RewriteRule ^my/wishlist$ /index.php?show=my&subshow=wishlist
RewriteRule ^my/inviter$ /index.php?show=my&subshow=inviter
RewriteRule ^my/partnership$ /index.php?show=my&subshow=partnership
RewriteRule ^my/affiliate$ /index.php?show=my&subshow=affiliate
RewriteRule ^my/invitefriends.html$ /index.php?show=my&subshow=invite
RewriteRule ^users/(.*)/$ /index.php?show=user&username=$1
RewriteRule ^my/invite/$ /index.php?show=my&subshow=invite
RewriteRule ^i([0-9]+)/$ /index.php?act=invite&fromuser=$1
RewriteRule ^refuse/([a-zA-Z0-9]+)/$ /index.php?show=refuse&refuseid=$1
RewriteRule ^my/edit-info/$ /index.php?show=my&subshow=edit-info
RewriteRule ^my/change-password/$ /index.php?show=my&subshow=change-password
RewriteRule ^my/confirm-mobile/$ /index.php?show=my&subshow=confirm-mobile
RewriteRule ^my/edit-notifications/$ /index.php?show=my&subshow=edit-notifications
RewriteRule ^my/coupons$ /index.php?show=my&subshow=coupons&month=$1&page=$2
RewriteRule ^my/changepassword/$ /index.php?show=my&subshow=changepassword
RewriteRule ^my/balance/$ /index.php?show=my&subshow=balance
RewriteRule ^payment/success.html$ /index.php?show=my&subshow=paysuccess
RewriteRule ^payment/fail.html$ /index.php?show=my&subshow=payfail
RewriteRule ^my/balance/pay/$ /index.php?show=my&subshow=balance&getpay=payact
RewriteRule ^my/buycoupons.html$ /index.php?show=my&subshow=buycoupons
RewriteRule ^my/buycouponssuccess.html$ /index.php?show=my&subshow=buycouponssuccess
RewriteRule ^regist/$ /index.php?show=regist
RewriteRule ^registok/$ /index.php?show=regist&page=ok
RewriteRule ^contacts/$ /index.php?show=contacts
RewriteRule ^contract/$ /index.php?show=contract
RewriteRule ^login/$ /index.php?act=login
RewriteRule ^signin/$ /index.php?show=signin

#RewriteRule ^signin/([a-z]+)/$ /index.php?show=signin&provider=$1

RewriteRule ^logout/$ /index.php?act=logout
RewriteRule ^regcomplete.html$ /index.php?show=regcomplete
RewriteRule ^activation-fail.html$ /index.php?show=activationfail
RewriteRule ^activation-is-completed.html$ /index.php?show=activationcomplete
RewriteRule ^action([0-9]*).html$ /index.php?show=action&action_id=$1
RewriteRule ^searchbycity/([0-9]*).html$ /index.php?show=searchbycity&city_id=$1
RewriteRule ^inc/js/my_translate.js$ /inc/js/my_translate.php

RewriteRule ^([a-z]+)/([0-9]+)/actions.html$ /index.php?show=allactions&time=$1&category=$2

RewriteRule ^article/([\w\.]+)/*$ /index.php?show=article&alias=$1
RewriteRule ^map/*$ /index.php?show=article&alias=map

RewriteRule .*\.svn|\.hg /error404
RewriteRule ^error([0-9]+)[/]?$ /inc/errors/$1.html

RewriteRule ^merchant[/]? /extension/merchant/index_one.php
RewriteRule ^webmaster[/]? /extension/affiliate/webmaster/index.php

RewriteRule ^landing/([0-9a-z]+)/$ /index.php?show=landingpage&landing_url=$1
RewriteRule ^landingpage/$ /index.php?show=landingpage

RewriteRule ^actions_list.xml$ kuponator_list.xml
RewriteRule ^(.*)_list.xml$ cron/$1_list.php

RewriteRule ^favicon.ico upload/logo/favicon.png

 

tas kas tur boldā tas tika likvidēts.

Link to comment
Share on other sites

izdzinu testu,  erorr loga fails neizveidojās, access log fails gan, kurš izskatījas šādi vietnes nosaukumu tikai te ar mmmm nocenzorēju un IP:

www.mmmmmmmm.ru 99.253. - - [17/Dec/2012:13:33:54 +0400] "GET / HTTP/1.0" 301 232 "-" "Mozilla/5.0 (Windows NT 6.0; rv:17.0) Gecko/17.0 Firefox/17.0 PTST/87"
mmmmmmmm.ru 99.253. - - [17/Dec/2012:13:33:54 +0400] "GET / HTTP/1.0" 500 86460 "-" "Mozilla/5.0 (Windows NT 6.0; rv:17.0) Gecko/17.0 Firefox/17.0 PTST/87"
mmmmm.ru 99.253. - - [17/Dec/2012:13:33:55 +0400] "GET /inc/js/my_translate.js HTTP/1.0" 200 2168 "http://mmmmmmmmm.ru/" "Mozilla/5.0 (Windows NT 6.0; rv:17.0) Gecko/17.0 Firefox/17.0 PTST/87"
mmmmmm.ru 213.180. - - [17/Dec/2012:13:33:56 +0400] "GET / HTTP/1.0" 500 86460 "-" "Mozilla/5.0 (compatible; YandexMetrika/2.0; +http://yandex.com/bots)"
mmmmmm.ru 99.253. - - [17/Dec/2012:13:34:25 +0400] "GET / HTTP/1.0" 500 86460 "-" "Mozilla/5.0 (Windows NT 6.0; rv:17.0) Gecko/17.0 Firefox/17.0 PTST/87"
mmmmmmm.ru 99.253. - - [17/Dec/2012:13:34:26 +0400] "GET /inc/js/my_translate.js HTTP/1.0" 200 2168 "http://mmmmmmm.ru/" "Mozilla/5.0 (Windows NT 6.0; rv:17.0) Gecko/17.0 Firefox/17.0 PTST/87"
 

Link to comment
Share on other sites

:) nav skaidrs cik caura:) tāpēc jau jāslēpj:) kamēr te ņēmāmies, skaidrs ir tikai viens, tā nav htaccess problēma tur viss  ir čiki piki, jāpēta tagad pats skripts caur ko viņš šitādu gļuku atgriež atpakaļ, nevar tā tak būt, ka vienā variantā lapa strādā, otrā nestrādā, no LV var atvērt jebkā, bet neviens robots atvērt lapu pats nevar, saka: 500 un viss.

Link to comment
Share on other sites

php.ini ieraksti

 

error_reporting  =  E_ALL & ~E_NOTICE
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 0
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = Off
error_log = syslog

Tad tail -f /var/log/syslog un skaties kas notiek skriptā, kurš producē 500, eg. izsauc index.php un seko syslogam. Pēc tam nepiemirsti novākt error logu no syslog lai nehogo reģistru. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...