php - Can't access files directly in browser or with AJAX - Opencart Installation -
i have custom php script i'm trying access via ajax, , return of 404 in browser or via ajax. i've been able access custom scripts via php in current environment. strange? here's .htaccess file, i've tried editing few things no luck. centos 6.4. google fu turns nothing. in advance help. permissions have been set 777 test no luck either.
# 1.to use url alias need running apache mod_rewrite enabled. # 2. in opencart directory rename htaccess.txt .htaccess. # support issues please visit: http://www.opencart.com options +followsymlinks # prevent directoy listing options -indexes # prevent direct access files <filesmatch "\.(tpl|ini|log)"> order deny,allow deny </filesmatch> # seo url settings rewriteengine on # if opencart installation not run on main web folder make sure folder run in ie. / becomes /shop/ rewritebase / rewriterule ^sitemap.xml$ index.php?route=feed/google_sitemap [l] rewriterule ^googlebase.xml$ index.php?route=feed/google_base [l] rewriterule ^download/(.*) /index.php?route=error/not_found [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewritecond %{request_uri} !.*\.(ico|gif|jpg|jpeg|png|js|css) rewriterule ^([^?]*) index.php?_route_=$1 [l,qsa] ### additional settings may need enabled servers ### uncomment commands removing # sign in front of it. ### if "internal server error 500" after enabling of following settings, restore # means host doesn't allow that. # 1. if cart allows add 1 item @ time, possible register_globals on. may work disable it: # php_flag register_globals off # 2. if cart has magic quotes enabled, may work disable it: # php_flag magic_quotes_gpc off # 3. set max upload file size. hosts limit , not allow overridden can try # php_value upload_max_filesize 999m # 4. set max post size. uncomment line if have lot of product options or getting errors forms not saving fields # php_value post_max_size 999m # 5. set max time script can take. uncomment line if have lot of product options or getting errors forms not saving fields # php_value max_execution_time 200 # 6. set max time input recieved. uncomment line if have lot of product options or getting errors forms not saving fields # php_value max_input_time 200 # 7. disable open_basedir limitations # php_admin_value open_basedir none
ajax script starts like
$.ajax({ url: '/phplibrary/dophp.php?make='+ thisvalue +'', data: "", datatype: 'json', success: function(rows)
error in chrome dev:
http://mydomain.com/phplibrary/dophp.php?make=honda 404 (not found)
edit: path exist.
can check url www
http://www.mydomain.com/phplibrary/dophp.php?make=honda
based on configuration, if http_server configured www, url without www may throw 404.
cheers :)
Comments
Post a Comment