URL rewriting doesn't work on Apache higher than 2.4.20

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Currently we use the following .htaccess file for URL rewriting which
works fine on Apache 2.4.20. On Apache 2.4.23 and 2.4.25 the URL
rewriting does not work anymore. Instead of the page the following
message appears: File not found.

---
php_value auto_detect_line_endings 1
php_value memory_limit 1024M
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /korting/
    ### Canonicalize codeigniter URLs
    # If your default controller is something other than
    # "welcome" you should probably change this
    RewriteRule ^(welcome(/index)?|index(\.php)?)/?$ / [L,R=301]
    RewriteRule ^(.*)/index/?$ $1 [L,R=301]
    # Removes trailing slashes (prevents SEO duplicate content issues)
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)/$ $1 [L,R=301]
    # Enforce www
    # If you have subdomains, you can add them to
    # the list using the "|" (OR) regex operator
    RewriteCond %{HTTP_HOST} !^(www) [NC]
    RewriteRule ^(.*)$ http://www.domain.nl/korting/$1 [L,R=301]
    # Enforce NO www
    #RewriteCond %{HTTP_HOST} ^www [NC]
    #RewriteRule ^(.*)$ http://domain.tld/$1 [L,R=301]
    ###
    # Removes access to the system folder by users.
    # Additionally this will allow you to create a System.php controller,
    # previously this would not have been possible.
    # 'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /korting/index.php/$1 [L]
    # Checks to see if the user is attempting to access a valid file,
    # such as an image or css document, if this isn't true it sends the
    # request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /korting/index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
#Without mod_rewrite, route 404's to the front controller
    ErrorDocument 404 /index.php
</IfModule>
---

This seems like a bug as the .htaccess works perfectly on Apache
2.4.20. We use PHP-FPM.

Please let us know. Thank you in advance.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux