• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Messed up .htaccess file

Status
Not open for further replies.

buzzdee

Chevereto Member
Hi,

I've updated to 2.4 and so far I can see no major problems...
But my .htacess file seems to be messed up, cause there are some things seeming weird to me.

This is my .htaccess, merged from previous versions of chevereto:
Code:
# Disable server signature
ServerSignature Off
 
 
# Disable directory listing (-indexes), Multiviews (-MultiViews) and enable Follow system links (+FollowSymLinks)
Options -Indexes
Options -MultiViews
Options +FollowSymLinks
 
# Turn on mod_rewrite
RewriteEngine On
 
# If you have problems with the rewrite rules, remove the "#" from the following RewriteBase line
# You will also have to change the path to reflect the path to your Chevereto installation
#RewriteBase /chevereto
 
# The /api rewrite
RewriteRule ^api$ api.php [L]
 
# If you want to have your own fancy "image not found" image remove the "#" from RewriteCond and RewriteRule lines
# Make sure to apply the correct paths to reflect your current installation
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule images/.+\.(gif|jpe?g|png|bmp) content/system/img/404.gif [NC,L]
 
RewriteRule ^images/(\w*\.)(jpg|png|gif)$ images/old/$1$2 [L] #legacy images
RewriteRule ^images/thumbs/(\w*\.)(jpg|png|gif)$ images/old/$1th.$2 [L] #legacy thumbs
 
RewriteRule ^admin/(.*) admin/index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
 
ErrorDocument 400 default
ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default

- Why do I have the entries at the end (ErrorDocument 400...) and why don't they exist anymore in version 2.4 ? I am sure, they have been in the htaccess file of former versions of chevereto.

- I have "RewriteCond %{REQUEST_FILENAME} !-f" two times. Should I delete one of the lines?

Slightly offtopic:
- To rename the "admin" folder: Is it OK just to rename the folder on my server. and the change the name in the config.php ? No further modifications?

Thanks for your help!
Greetings,
Buzz
 
Actually ErrorDocument is deprecated because the rewrite rule on index.php overrite it. And the "RewriteCond %{REQUEST_FILENAME} !-f" is ok, it works in that way.
 
OK, so I can delete the ErroDocuments... :)
And I can keep the two entries ""RewriteCond %{REQUEST_FILENAME} !-f"" at the same time ?
 
OK, so I can delete the ErroDocuments... :)
And I can keep the two entries ""RewriteCond %{REQUEST_FILENAME} !-f"" at the same time ?

Yes, it appears two times because we are dealing with two different rules.
 
Status
Not open for further replies.
Back
Top