There is a php-script getCatalog.php , which works great if it lies in the root of the site, i.e. I run this way: http://mysite.com/getCatalog.php , but if the script goes to a folder, it fails and gives an HTTP error ERROR 500 . Run like this: http://mysite.com/Catalog/Group1/getCatalog.php

Help solve this problem.

.htaccess I have only in the root of the site in the folders of this file is not. Here is the content.

 # For full documentation and other suggested options, please see # http://svn.modxcms.com/docs/display/MODx096/Friendly+URL+Solutions # including for unexpected logouts in multi-server/cloud environments # and especially for the first three commented out rules #php_flag register_globals Off AddDefaultCharset utf-8 #php_value date.timezone Europe/Moscow #Options +FollowSymlinks RewriteEngine On RewriteBase / # Fix Apache internal dummy connections from breaking [(site_url)] cache RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC] RewriteRule .* - [F,L] # Rewrite domain.com -> www.domain.com -- used with SEO Strict URLs plugin #RewriteCond %{HTTP_HOST} . #RewriteCond %{HTTP_HOST} !^www\.example\.com [NC] #RewriteRule (.*) http://www.example.com/$1 [R=301,L] # without www #RewriteCond %{HTTP_HOST} . #RewriteCond %{HTTP_HOST} !^example\.com [NC] #RewriteRule (.*) http://example.com/$1 [R=301,L] # without www all domian #RewriteCond %{HTTP_HOST} . #RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC] #RewriteRule ^(.*)$ http://%1/$1 [R=301,L] # Exclude /assets and /manager directories and images from rewrite rules RewriteRule ^(manager|assets|js|css|images|img)/.*$ - [L] RewriteRule \.(jpg|jpeg|png|gif|ico)$ - [L] # For Friendly URLs RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] # Reduce server overhead by enabling output compression if supported. #php_flag zlib.output_compression On #php_value zlib.output_compression_level 5 RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^mysite.net.ua [NC] RewriteRule ^(.*) http://www.mysite.net.ua/$1 [L,R=301] 

Content php script getCatalog.php :

 <?php echo "Hello world!"; ?> 
  • The rights to the folders are 777, initially there were 755 - Igor
  • one
    and we have to guess what is inside this file? - teran
  • one
    script code and htaccess contents of all three folders, if there is one, to the studio - Stanislav Belichenko
  • 3
    It is interesting that our valiant enthusiasts always ask to see the code, but it never occurred to anyone to look at the error message. pohapeshniki such pokhapeshniki. - Ipatiev
  • Added the contents of the htaccess and php-script - Igor

0