Tag Info

Hot answers tagged

3

This really depends on the error being served. For a 404 error, there would be no reason that there are any issues with the server - meaning all the php stuff should be working find. But if you have a 500 there may be an issue with the server, preventing php from running. This really depends on your tolerance for risk.


3

I would say yes, simply because there isn't any need for dynamic error pages. For example: If your database is down or under pressure, it is unlikely that you will want your error pages to be attempting database connections. Likewise, if your server is under pressure, you don't want your error pages to be carrying out any server-side processing. All-in-all, ...


2

Are you talking about sharding? Look at "Advanced Apache Rewriting" - at least probably your solution will use a RewriteMap .. although you do say dynamically, I still assume your list of users is static. RewriteMap Apache Documentation should be the way to go - you put your mapping in a text file like so: Ralf.S.Engelschall rse # Bastard Operator From ...


2

You can't check for the query string using the RewriteRule pattern (the query string is stripped before pattern matching, as is the hostname, etc). So, the rules you stated above simply won't match and you'll get a 404. However, you can use the RewriteCond directive to check the query string: For example: domain.tld/en/abc.php?foo to ...


2

It depends on your situation. Your PHP could also handle the lack of database connection in a nice way. But if you have a custom PHP with many possibilities for bugs and problems, go for an HTML page. If you're using a system such as Drupal or WordPress it's best to go with whatever is provided there, possibly adding something such as a module such as ...


1

You should only serve very generic error page to the user, as providing more details on error may disclose highly valuable information for malicious attacker. However you need more information for debugging. There are following solutions: Log all error information rather than just responding with it. This is good for production servers as allows to ...


1

I think the following mod_rewrite directives should do what you require, however, whether they do anything at all may be dependent on your configuration. RewriteEngine on RewriteCond %{QUERY_STRING} rsform RewriteRule ^joomla/(.+)$ http://watervriendengeleen.nl/formulieren/$1 [L,R=301] This redirects all requests for files in your /joomla/ subfolder, ...


1

Wildcard VirtualHost You can use a wildcard VirtualHost statement. <VirtualHost *:80> DocumentRoot /path/to/doc/root ServerName *.domain.com </VirtualHost> If you have a specific host, e.g. www.domain.com, put its VirtualHost stanza above the wildcard one. Apache works on a first match basis. Also, you may want to add: ...



Only top voted, non community-wiki answers of a minimum length are eligible