Welcome To Snipplr


Everyone's Recent Apache Snippets Tagged htaccess



Redirects visitors of a webpage to a specific URL while allowing access for specified IP-addresses.
3 595 posted 14 years ago by dertimbo
1 646 posted 14 years ago by chrisdpratt
Needed to retire a staging domain, so I'm redirected all traffic to the equivalent page in the root directory in the .htaccess file
1 632 posted 14 years ago by canarymason
These tweaks improved my Yslow score from F to B.
1 622 posted 14 years ago by zachharkey
3 682 posted 14 years ago by sveggiani
1 542 posted 14 years ago by dennyhalim
2 514 posted 14 years ago by dennyhalim
long htaccess expired header for all files except for server side scripts
2 761 posted 14 years ago by dennyhalim
Just insert it into your .htaccess file to redirect all your 404 error pages to any address
2 639 posted 15 years ago by caruso_g
In MODx, insert below: # The Friendly URLs part RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d
2 639 posted 15 years ago by hotdiggity
A more generic and portable snippet
4 659 posted 15 years ago by dertimbo
My [original post](http://drupal.org/node/84895) languished for years before someone pointed out a possible solution [here](http://drupal.org/node/53705). The following user-submitted code may be useful in redirecting URLs for the /files directory...
0 658 posted 15 years ago by zachharkey
This is a little trick I've used a few times to emulate Folders on a site and drop the extensions. In this example I'm using a PHP site but could easily be ported for other file types. One caveat to look out for is files will not always want to be ca...
1 444 posted 15 years ago by jackkeller
Increases the memory limit of php and html files.
4 1094 posted 15 years ago by zachharkey
3 751 posted 15 years ago by erik
SESSIONNAME = Name of your session cookie; example.com = Domainname of your site
1 479 posted 15 years ago by HeWo42
This is a replacement for the default PHP settings in Drupal's .htaccess file. Increasing the memory_limit, max_post_size etc. prevents a lot of errors, especially when using image modules.
0 667 posted 15 years ago by zachharkey
Please, be careful with trailing slash rewrite as post requests without a trailing slash will be ignored. Be sure to test if you plan on using that one. Not compatible with Drupal.
0 534 posted 15 years ago by troynt
canonical redirect at .htaccess
0 1670 posted 15 years ago by kossmoss
Le hotlinking d'image consiste selon wikipédia : "à utiliser l'adresse d'un fichier publié sur un site web, le plus souvent une image, pour l'afficher sur un autre site, sur un blog, dans un forum, etc. En d'autres termes, au lieu d'enregistrer l'...
0 455 posted 15 years ago by sebus
1 561 posted 15 years ago by endorfin
This is good to add to folders which are chmod to 777.
1 588 posted 15 years ago by luizlopes
3 776 posted 15 years ago by johnloy
1 557 posted 15 years ago by bpj1966