Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted March 10, 20168 yr Hi, if i go in a directory without a file inderx, eg: https://laltroweb.it/test i receive a loop redirect cause from this code by ipb in htaccess: Quote RewriteCond %{REQUEST_FILENAME} !-f RewriteRule \.(js|css|jpeg|jpg|gif|png|ico)(\?|$) /404error.php [L,NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] if i remove, all work again (i receive a simple forbidden by my server - cause global "no directory index" in my root htaccess. someone can help me to fix this? :| thanks, S.N.
March 10, 20168 yr If you are on a server where you can control indexing, you might want to set your folder to "No Indexing" and see if that helps. You can control it through cPanel if you have that or through an .htaccess file. Options are: No Indexing Standard Indexing (filename only) Fancy Indexing (filename and description)
March 11, 20168 yr Author like i've write: Quote if i remove, all work again (i receive a simple forbidden by my server - cause global "no directory index" in my root htaccess. then, thanks for reply, but i already have No Indexing in entire root
March 11, 20168 yr Ahh, okay... I missed that. After all my loop problems at the beginning, I can't seem to duplicate what you have. Hopefully someone can help you.
March 11, 20168 yr Author Ok, thanks for reply! Maybe something missing in php config, but all request from ipb is valid... then, i don't know :/
March 11, 20168 yr Author Ok, fixed now 403error.php in root directory: (like default output server page and based on default 404error page from ipb) <?php header("HTTP/1.0 403 Forbidden"); $uri = $_SERVER["REQUEST_URI"]; print <<<EOF <html> <title>403 Forbidden</title> <body> <h1>Forbidden</h1> <p>You don’t have permission to access $uri on this server.</p> <p>Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.</p> </body> </html> EOF; exit; and: ErrorDocument 403 /403error.php in htaccess (at the end). Now all is good
Archived
This topic is now archived and is closed to further replies.