logo
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge
 


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.




AH00664: RewriteOptions: MaxRedirects ERROR?

 
Post new topic   Reply to topic    Apache Forum Index -> Apache



View previous topic :: View next topic  
Author Message
ray2018



Joined: 04 Mar 2018
Posts: 4
Location: USA

PostPosted: Sun 04 Mar '18 16:37    Post subject: AH00664: RewriteOptions: MaxRedirects ERROR? Reply with quote

I have a PHP/Smarty based web app. I have it running on a VM locally on my network. The home PATH is /home/ray/USN/Script so that’s why I need the RewriteOptions. Note I do not have a very deep knowledge of apache and it's inner workings such as .htaccess usage.

I have everything installed on a Vbox VM right now in my local network. The site works fine but these errors are bugging me.

Here is part of the .htaccess file:

Code:
Options +FollowSymLinks -MultiViews
<FilesMatch "\.(htaccess|htpasswd|ini|log|sh|inc|bak|tpl)$">
Order Allow,Deny
Deny from all
</FilesMatch>

# Cache Control
<IfModule mod_headers.c>
<FilesMatch "\.(jpg|jpeg|png|gif|swf|css|js)$">
    Header set Cache-Control "max-age=604800, public"
</FilesMatch>
</IfModule>

RewriteEngine on
# RewriteOptions MaxRedirects=1
RewriteOptions LimitInternalRecursion=1
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule .* - [L]


And the sites-available file:


Code:
<VirtualHost *:80>

    <Directory /home/ray/USN/Script>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require all granted
    </Directory>

        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /home/ray/USN/Script/

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet


I am getting the following error.log entries using the MaxRedirects=1. These are happening every 5 seconds. Obviously the error.log grows quite large.

[Sat Mar 03 16:47:47.752555 2018] [rewrite:warn] [pid 1685] AH00664: RewriteOptions: MaxRedirects option has been removed in favor of the global LimitInternalRecursion directive and will be ignored.
[Sat Mar 03 16:47:47.753214 2018] [rewrite:warn] [pid 3742] AH00664: RewriteOptions: MaxRedirects option has been removed in favor of the global LimitInternalRecursion directive and will be ignored.


So I changed MaxRedirects to LimitInternalRecursion=1 and then get this: (someone on another forum recommended this)

[Sat Mar 03 16:47:53.752085 2018] [core:alert] [pid 1681] [client 192.168.1.149:56132] /home/ray/USN/Script/.htaccess: RewriteOptions: unknown option 'LimitInternalRecursion=1', referer: http://192.168.1.130/
[Sat Mar 03 16:47:53.753271 2018] [core:alert] [pid 3735] [client 192.168.1.149:56133] /home/ray/USN/Script/.htaccess: RewriteOptions: unknown option 'LimitInternalRecursion=1', referer: http://192.168.1.130/


…as well as this:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
________________________________________
Apache/2.4.18 (Ubuntu) Server at 192.168.1.130 Port 80


Any ideas why this is happening and what the fix is?

I would really appreciate any help I can get.

Thanks,

Ray

Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6352
Location: Germany, Next to Hamburg

PostPosted: Thu 08 Mar '18 11:19    Post subject: Reply with quote

You can try

Code:

      RewriteEngine on
      RewriteBase /
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule (.*) index.php?page=$1 [QSA]
Back to top


Post new topic   Reply to topic    Apache Forum Index -> Apache
Page 1 of 1