• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

enable .htaccess on Plesk 12

Hi Tinus,

basically, ".htaccess" - files work with the apache - webserver and Plesk 12 with no additional settings or modifications. Could you please explain, what you placed inside your ".htaccess" - file?

Apart from possible false or incorrect definitions, are you aware that ".htaccess" - files only work with apache and not with nginx? For nginx you have to convert the definitions from your ".htaccess" - files and place them for example into your additional directive settings in your webserver - settings.
To help you to convert ".htaccess" - files for nginx, Plesk has as well an additional Plesk extension for free, which you can install over the extension catalogue ( "htaccess to nginx converter" ).
 
Thanks, I'm new to Plesk and was not aware of nginx.
I'm moving a wordpress installation to a new server with Plesk 12 and want to enabled compression/caching like so:

# Deflate Compression by FileType
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
...
</IfModule>
# Deflate Compression by FileType

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
...
</IfModule>

<filesMatch "\\.(js|js.gz)$">
Header set Cache-Control "max-age=604800, private"
</filesMatch>
## EXPIRES CACHING ##

How can I apply that to nginx?

My .htaccess also has a bunch of redirects, I'm trying to use converter for that.
 
Hello,

I also have the problem .htaccess daen in Wordpress ordener.

i have the line
<IfModule mod_dtimeout.c>
<Files ~ .php> SetEnvIf Request_URI "admin-ajax.php" DynamicTimeout = 150 </ Files>
</ IfModule>

tried using the converter in plesk. Unfortunately he did not.

And that I wanted for a wordpress used in the .htacces:
#RewriteEngine On
#RewriteCond% {HTTPS} off
#RewriteRule (. *) Https: //% {HTTP_HOST}% {REQUEST_URI} [R = 301, L]
<files wp-config.php>
Order deny, allow
deny from all
</ Files>
<IfModule mod_headers.c>
Header set X-Frame-Options "sameorigin"
#Header always set Strict transport security "max-age = 31536000; includeSubDomains; preload"
</ IfModule>
<IfModule mod_headers.c>
Header set X-XSS-Protection "1; mode = block"
</ IfModule>
<IfModule mod_headers.c>
Header set X-XSS-Protection "1; mode = block"
</ IfModule>
<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
</ IfModule>
#Force secure cookies (uncomment for HTTPS)
<IfModule mod_headers.c>
Header always edit Set-Cookie (. *) "$ 1; HTTPOnly; Secure
#Header edit Set cookie ^ (. *) $ $ 1; HttpOnly; Secure
</ IfModule>
<Files xmlrpc.php>
Order Deny, Allow
Deny from all
</ Files>
# Do not list directories
<IfModule mod_autoindex.c>
Options index
</ IfModule>
# Protect all readme.txt files from all plugins
<Files readme.txt>
Order allow, deny
Deny from all
</ Files>
# Block the include-only files.
# Do not use in Multisite without reading the note in Codex!
# See: Hardening WordPress « WordPress Codex
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^ wp-admin / includes / - [F, L]
RewriteRule! ^ Wp-includes / - [S = 3]
RewriteRule ^ wp-includes / [^ /] + \. Php $ - [F, L]
RewriteRule ^ wp-includes / js / tinymce / slow /.+ \. Php - [F, L]
RewriteRule ^ wp-includes / theme-compat / - [F, L]
</ IfModule>

then always comes the error 500, after I have inserted this into the wp folder.

Do you have an idea?
 
Hi jmzbeki,

if you desire to use HSTS and are using NGINX in combination with apache, pls. consider to read: => #2

If you desire standart configurations for NGINX - rewrite directives for WordPress, pls. consider to visit: => Nginx « WordPress Codex
... and pls. be aware, that you should not use examples as the ones that you posted for your ".htaccess" - file. It is essential, that you correct your case-sensitive definitions, as they will certainly result in issues/errors/problems with your apache.

In addition, pls. note, that not all existent apache rules can be transformed into nginx directives. If you desire to inform yourself about nginx directives, pls. visit for example:
=> Alphabetical index of directives .
 
am having issue with the inner file inside folder on my plesk. Its requesting for login details.
can anyone here help me out
Can you be more specific about your issue? Try to describe exactly what commands did you use when you encountered a problem, which error occurred and what have you expected to happen instead.
 
Back
Top