Default .htaccess file for WordPress?

Here is the default code for that file. # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress you can check it here for default htaccess file. http://codex.wordpress.org/Using_Permalinks. Thanks. I hope it helps little.

“Too many redirects” ONLY when trying to access wp-admin page

I found a solution that fixed my issue. Sources: A.) https://sharpten.com/blog/2018/01/17/wordpress-stuck-many-redirects-error-loop-using-ssl.html B.) (Sublink within A) https://wordpress.org/support/article/administration-over-ssl/ Excerpt: Adding the following lines of code at the end of my wp-config.php file resolved the redirect conflict. if (strpos($_SERVER[‘HTTP_X_FORWARDED_PROTO’], ‘https’) !== false) $_SERVER[‘HTTPS’]=’on’;

Moving a WP Multisite to a subdirectory

I know it’s old but I fixed it! i installed WP MU in a subfolder. htaccess: RewriteEngine On RewriteBase /YOUR_SUBFOLDER RewriteRule ^index\.php$ – [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ – [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule … Read more

How to create custom 401, 403 and 500 error pages?

Error pages are served up via .HTACCESS, if you are using Apache you would use the ErrorDocument directive and add the status and URL to it. So it would look like this in your .htaccess file: ErrorDocument 401 http://yourwebsite.com/error-401 ErrorDocument 403 http://yourwebsite.com/error-403 ErrorDocument 500 http://yourwebsite.com/error-500 You could use the following function below. This will dynamically … Read more

Best collection of code for your .htaccess file [closed]

These are 3 snippet for better performance, regarding Yahoo! rules: Disable Etags: Header unset ETag FileETag None Add expire headers: <FilesMatch “\.(ico|jpg|jpeg|png|gif|js|css|swf)$”> Header set Expires “Tue, 16 Jun 2020 20:00:00 GMT” </FilesMatch> Or ExpiresActive On ExpiresByType text/html “access plus 1 day” ExpiresByType image/gif “access plus 10 years” ExpiresByType image/jpeg “access plus 10 years” ExpiresByType image/png … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)