.htaccess ErrorDocument 404 not showing up

First, note that restarting httpd is not necessary for .htaccess files. .htaccess files are specifically for people who don’t have root – ie, don’t have access to the httpd server config file, and can’t restart the server. As you’re able to restart the server, you don’t need .htaccess files and can use the main server … Read more

Do I need to convert .CER to .CRT for Apache SSL certificates? If so, how?

File extensions for cryptographic certificates aren’t really as standardized as you’d expect. Windows by default treats double-clicking a .crt file as a request to import the certificate into the Windows Root Certificate store, but treats a .cer file as a request just to view the certificate. So, they’re different in the sense that Windows has … Read more

Reference: mod_rewrite, URL rewriting and “pretty links” explained

To understand what mod_rewrite does you first need to understand how a web server works. A web server responds to HTTP requests. An HTTP request at its most basic level looks like this: GET /foo/bar.html HTTP/1.1 This is the simple request of a browser to a web server requesting the URL /foo/bar.html from it. It … Read more

How can I make PHP display the error instead of giving me 500 Internal Server Error [duplicate]

Check the error_reporting, display_errors and display_startup_errors settings in your php.ini file. They should be set to E_ALL and “On” respectively (though you should not use display_errors on a production server, so disable this and use log_errors instead if/when you deploy it). You can also change these settings (except display_startup_errors) at the very beginning of your … Read more

Adding VirtualHost fails: Access Forbidden Error 403 (XAMPP) (Windows 7)

Okay: This is what I did now and it’s solved: My httpd-vhosts.conf looks like this now: <VirtualHost dropbox.local:80> DocumentRoot “E:/Documenten/Dropbox/Dropbox/dummy-htdocs” ServerName dropbox.local ErrorLog “logs/dropbox.local-error.log” CustomLog “logs/dropbox.local-access.log” combined <Directory “E:/Documenten/Dropbox/Dropbox/dummy-htdocs”> # AllowOverride All # Deprecated # Order Allow,Deny # Deprecated # Allow from all # Deprecated # –New way of doing it Require all granted </Directory> … Read more

Apache redirect to another port

You should leave out the domain http://example.com in ProxyPass and ProxyPassReverse and leave it as /. Additionally, you need to leave the / at the end of example/ to where it is redirecting. Also, I had some trouble with http://example.com vs. http://www.example.com – only the www worked until I made the ServerName www.example.com, and the … Read more

Accessing localhost (xampp) from another computer over LAN network – how to?

Localhost is just a name given for the loopback, eg its like referring to yourself as “me” .. To view it from other computers, chances are you need only do http://192.168.1.56 or http://myPcsName if that doesnt work, there is a chance that there is a firewall running on your computer, or the httpd.conf is only … Read more

How to Set AllowOverride all

In case you are on Ubuntu, edit the file /etc/apache2/apache2.conf (here we have an example of /var/www): <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> and change it to; <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> then, sudo service apache2 restart You may need to also do sudo … Read more

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