WordPress Permalinks still not working despite all necessary settings

Since the domain/site has an ssl, the vhosts file for the ssl is separate and also needs to be updated. Not just the normal port 80 entry. vhost (:80) my-wp-site.com.conf <VirtualHost *:80> … DocumentRoot /home/ubuntu/sites/my-wp-site.com … <Directory /home/ubuntu/sites/my-wp-site.com> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> … </VirtualHost> vhost (:443) my-wp-site.com-le-ssl.conf <IfModule mod_ssl.c> <VirtualHost … Read more

Override htacces rule only for specific directory

To effectively disable that condition for that one URL-path, you will need to add another rule immediately before the rule in question. ie. before the # Abuse Agent Blocking comment. For example: # Allow an empty User-Agent for requests that start “/wp-content/uploads/xmls” RewriteCond %{HTTP_USER_AGENT} ^$ RewriteRule ^wp-content/uploads/xmls – [S=1] # Abuse Agent Blocking RewriteCond %{HTTP_USER_AGENT} … Read more

How can i redirect one url to another url using .htaccess or add_rewrite_rule

I’m honestly struggling to comprehend this failure state – I believe I’ve reproduced the issue locally, and in my testing the RewriteRule directive hits but then WordPress processes the original input, resulting in a fairly catch-all attachment rewrite producing a query for a non-existent attachment. I may continue playing with it to try and figure … Read more

Why is my mod_rewrite not working?

First, your additional line comes too late. The rule before catches everything you want to match. Second, it doesn’t what you want. Your … RewriteRule /([0-9]+/?)$ /about/latest-news/$1 [NC,L] … matches requests like example.com//0000000000000000000/ or example.com/about/latest-news/2010/ (infinite loop!). The first argument for RewriteRule omits the starting /. To match year archives you need rather: RewriteRule ^(\d\d\d\d)/?$ … Read more

Rewrite rule to load images from production does nothing

RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.php [L] # If images not found on development site, load from production RewriteCond %{REQUEST_URI} ^/wp-content/uploads/[^\/]*/.*$ RewriteRule ^(.*)$ https://www.example.com/$1 [QSA,L] The problem here is that “If images not found on development site” then the request has already been rewritten to index.php by the preceding RewriteRule (WordPress front-controller), … Read more

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