Disable mod_rewrite in subdirectory

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MicroSun
    Junior Member
    • Mar 2008
    • 3

    #1

    Disable mod_rewrite in subdirectory

    Hello,

    I have a htaccess file in the main folder which looks like this:
    Code:
    #Options FollowSymLinks
    RewriteEngine On
    #RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule (.*) index.php
    Besides this I have a subdirectory scripts/demo where I have the htaccess file:
    Code:
    php_value upload_max_filesize 10M
    php_value post_max_size 10M
    php_value max_execution_time 200
    php_value max_input_time 200
    Unfortunately if I want to visit the scripts/demo/index.php then I will be redirected to the main index.php.

    If I remove the PHP settings from the htaccess file in the subdir and add
    Code:
    RewriteEngine Off
    then it works fine. However I need the PHP settings as well.

    How can I disable url rewrite for my scripts/demo subdirectory? Which htaccess file should I edit?

    Thanks in advance!
  • AndrewT
    Administrator
    • Mar 2004
    • 3655

    #2
    Those PHP settings won't work like that anyways. PHP settings need to be placed in a php.ini file and then the php.ini file needs to be placed in each directory where the setting changes are required.

    Comment

    • AndrewT
      Administrator
      • Mar 2004
      • 3655

      #3
      Note that the syntax is different in php.ini files so you would use:

      upload_max_filesize = 10M
      post_max_size = 10M
      max_execution_time = 200
      max_input_time = 200

      Comment

      • MicroSun
        Junior Member
        • Mar 2008
        • 3

        #4
        Thanks, it works fine!

        Comment

        Working...