Tag Info

Hot answers tagged


You don't. The web server is allowed to decode percent-encoded characters which don't decode to special characters before applying rewrite rules, and is allowed to decode the remainder of percent-encoded characters before passing the data to your web application. (See RFC 3986.) What you should be doing is applying the front controller pattern in your web ...


Because you regex doesn't match. ^[A-Za-z0-9]$ matches URIs composed of one alphanumeric character and you didn't put any leading slash nor capture group. You need ProxyPassMatch ^/([A-Za-z0-9]+)$ https://example1.com/news-$1 instead.


In DA go to the following path: User level --> Domain pointer Uncheck "Create as an Alias" before adding your second domain. The domain type, then, will be "pointer" which solves your problem.


Well this is embarrassing. I kept thinking the the order deny,allow meant the list was treated like an ACL or firewall rule when it really was not. The last rule being "Allow from all" overrode everything I denied. The correct config is this: BrowserMatchNoCase "^bingbot" block_spider BrowserMatchNoCase "^msnbot" block_spider <Proxy *> ...


First of all, if you have access to server configuration, you should not use .htaccess as it slows down your Apache. Also, it is much easier to handle this with two separated virtual hosts. 1) /etc/apache2/sites-enabled/000-default (for IP and non-specified hostnames): <VirtualHost *:80> DocumentRoot /var/www/html </VirtualHost> 2) ...


If the user arrives via .com or .net, they would presumably continue to do so after you've rewritten the request to a relative location as shown in your example. In other words, the HTTP_HOST condition will always be true. The .* regular expression is equivalent to "match (almost) any character 0 or more times," and the ^ (start of string) and $ (end of ...


Due to being a Drupal site, all non-file/directory requests were redirecting to index.php?q=$1. I instead needed to evaluate the query string, as per the following: # Set CORS domain for fonts. RewriteCond %{QUERY_STRING} \.ttf RewriteRule ^(.*)$ $1 [E=cors:1] Header set Access-Control-Allow-Origin "*.example.com" env=cors

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