New answers tagged

2

Automatic redirects for language are not user friendly and should not be used. There are two common ways that language redirects are implemented. The first is by identifying the country a person is from based on IP address, and redirecting to the language of that country. There are several problems with this approach: Geo-IP databases are inaccurate and ...


2

# Redirects http to https protocol RewriteCond %{HTTPS} !on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} Your HTTP to HTTPS redirect is in the wrong place. It needs to be at the top of your .htaccess file, immediately after the RewriteBase directive and before the www to non-www redirect. (You are also missing R and L flags to trigger a permanent ...


1

I don't normally like to redirect away from the root but if that is your goal try this. RewriteEngine On RewriteRule ^$ /forum [L] This Question on StackOverflow should get you what you need.


1

RewriteCond %{HTTP_COOKIE} sbjs_migrations|sbjs_current_add|sbjs_first_add|sbjs_first|sbjs_current|sbjs_udata RequestHeader unset Cookie Note that RewriteCond (mod_rewrite) and RequestHeader (mod_headers) are unrelated. You need to modify/edit the Cookie HTTP request header to remove just those specific cookies, which you can do using the RequestHeader ...


3

Since these "old" URLs no longer exist, it is arguably better (ie. more efficient) to perform these redirects late in your application logic, ie. when a 404 would otherwise be triggered, rather than early in .htaccess. This greatly reduces the number of times your redirect logic is processed - prioritising normal site visitors (since you are ...


2

# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.example\.com [NC] RewriteCond %{REQUEST_URI} !exclude RewriteRule ^(.*) http://subdomain.example.com/$1 [L,R=301] RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] &...


2

Although Patrick is correct in saying that web browsers do not support SRV records, Minecraft does support them, so there's no need for a reverse proxy setup. According to this NameCheap tutorial, you'll need to create an SRV record with the following info: Service: _minecraft Protocol: _tcp Priority: 0 Weight: 5 Port: [custom port] ...


Top 50 recent answers are included