301 redirect on bludit

1dtravel
Ssr. Bludit
Posts: 22
Joined: Sun Apr 09, 2023 5:12 pm

It is necessary to make redericts so that there are no duplicates. Who wouldn't be able to share htaccess?

Need to make redirects 301
http on https
https://www.site.com on https://site.com
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

This is explained in the support section of your hosting. ;-)

Use the following .htaccess:

Code: Select all

AddDefaultCharset UTF-8

<IfModule mod_rewrite.c>

# Enable rewrite rules
RewriteEngine on

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Base directory
RewriteBase /

# Deny direct access to the next directories
RewriteRule ^bl-content/(databases|workspaces|pages|tmp)/.*$ - [R=404,L]

# All URL process by index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [PT,L]

</IfModule>
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
1dtravel
Ssr. Bludit
Posts: 22
Joined: Sun Apr 09, 2023 5:12 pm

Thanks. I put it in the wrong place. Does it matter? I put these lines at the very end. In any case, this should be added to the bludit documentation.
1dtravel
Ssr. Bludit
Posts: 22
Joined: Sun Apr 09, 2023 5:12 pm

When writing in the admin panel of the site, I get a server error 412. I have tested this in two browsers in chrome and mozilla. Can you help me?

This only happens when I correct the master data in /admin/settings. for example, I correct the name of the site.
all other pages are working fine.
Can you help me?
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

This is caused by the security rules of your server.

What you can do is explained at

https://cp.freehostia.com/help/view-article/?id=546
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
1dtravel
Ssr. Bludit
Posts: 22
Joined: Sun Apr 09, 2023 5:12 pm

I logged in from another ip via vpn and another browser. The error did not disappear. New pages are being created. The error does not appear. But when I change the site name or description, it appears again.
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Have you done, what your hoster suggests concerning ModSecurity?
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
1dtravel
Ssr. Bludit
Posts: 22
Joined: Sun Apr 09, 2023 5:12 pm

answer: Another trigger was the reason for the /admin/settings page which I just 'ruled-out" with exception in the .htaccess file of the site, please check again.

I can't understand why the error is only in one section -the main url /admin/settings? If there was a block, it would be all over the site.
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Please answer my question: Have you followed the instructions of your hoster? Yes or no?
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
1dtravel
Ssr. Bludit
Posts: 22
Joined: Sun Apr 09, 2023 5:12 pm

Yes. This is a paid feature on the hosting. For some reason, the entry in the admin panel by the brandmurem server is defined as hacking. Why this happens is not clear to me. I had to disable this feature.

You need to think about how to avoid this. It's not very convenient.
Post Reply