404 Not Found The requested URL was not found on this server

In Ubuntu I did not found httpd.conf, It may not exit longer now. Edit in apache2.conf file working for me. cd /etc/apache2 sudo gedit apache2.conf Here in apache2.conf change <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> to <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>

Best Practice: 301 Redirect HTTP to HTTPS (Standard Domain)

To start with your favorite solution: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L] </IfModule> In the part handling non-https URLs you are redirecting to %{HTTP_HOST}. Then, in case your host name started with “www”, a second redirect has to take place to send … Read more

mod_rewrite RewriteCond – is NC flag necessary for just domain part? And some more

Having [NC] is definitely not mandatory but it is recommended to have it for matching domains. Modern browsers might be converting domain names to lowercase but what about old browsers and command line utils like wget, curl etc, so you should not always rely on clients sending you lowercase domain name and keep [NC]. About … Read more

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