Skip to content

Instantly share code, notes, and snippets.

View gsahatqija's full-sized avatar

Granit Sahatqija gsahatqija

View GitHub Profile
@gsahatqija
gsahatqija / .htaccess
Created July 14, 2021 09:25 — forked from markhowellsmead/.htaccess
Detect browser language and redirect to appropriate language version of the website
# Redirect visitors to the root domain path (e.g. www.mywebsite.ch) to the appropriate language version
# Fallback to English version if no matching browser language defined
# Based on language version being at e.g. www.mywebsite.ch/de/
# language is ES-MX (Mexico)
RewriteCond %{HTTP:Accept-Language} ^es-mx [NC]
RewriteRule ^$ /mx/ [L,R=301]
# language is ES-ES (Spain)
RewriteCond %{HTTP:Accept-Language} ^es-es [NC]
@gsahatqija
gsahatqija / .htaccess
Created July 14, 2021 09:24 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
axios({
method: 'post',
url: '/user/12345',
data: {
firstName: 'Fred',
lastName: 'Flintstone'
}
}).then((response) => {
});
$scope.fullscreenUrl = function(path) {
if (window.width < 1000) {
return $baseUrl + croppa.url(path, 1100, null, ['resize']);
} else {
return $baseUrl + croppa.url(path, 2200, null, ['resize']);
}
};