Welcome To Snipplr


Everyone's Recent Snippets Tagged htaccess



« Prev 1 2 3 4 5 ... 9
  1. FAV

    How to set the PHP maximum execution time and script memory limit in an .htaccess file

    How to set the PHP maximum execution time and script memory limit in an .htaccess file
    Apache 156 views posted 4 months ago by cerxx
  2. FAV

    Redirect HTTP to HTTPS in Apache

    Redirect HTTP to HTTPS in Apache
    Apache 154 views posted 5 months ago by cerxx
  3. FAV

    Redirect subdomains to a folder on the main domain

    There is a domain: domain.ru There are subdomains subdomain.domain.ru and forum.domain.ru domain.ru is configured as a host and is located in the folder ... / www / domain / Subdomains are aliases of the main domain - i.e. lead to the same folder...
    Apache 8 views posted 1 year ago by cerxx
  4. FAV

    Htaccess rewrite file for Letsencrypt and CakePHP app

    This .htaccess actually forces all traffic to https, and allows cakephp app to work properly, as well as letsencrypt to go thru
    Apache 17 views posted 2 years ago by acosonic
  5. FAV

    Prevent Access to a Specific File/s in .htaccess

    This example shows you how to restrict to a specific file or multiple files. Add the following code block and edit the file name/s according to yuor needs.
    Bash 13 views posted 2 years ago by apphp-snippets
  6. FAV

    Force www./no-www. in .htaccess

    This example shows you how to force www. or no-www. using .htaccess file.
    Bash 13 views posted 2 years ago by apphp-snippets
  7. FAV

    Redirect to Another Directory in .htaccess

    This example shows you how to create redirection o another directory. It may be useful, for example, when you have a project, placed in sub-directory.
    PHP 18 views posted 4 years ago by apphp-snippets
  8. FAV

    Force Rewrite for https and .html to .php in htaccess

    This rewrite will not work on WordPress. It forces .htm and .html files that no longer exist to go to the new .php versions of the pages.
    Apache 17 views posted 4 years ago by jefferis
  9. FAV

    301 Weiterleitung mit php

    Statt mit .htaccess kann eine 301-Weiterleitung auch über php erfolgen
    PHP 12 views posted 5 years ago by ulfinger
  10. FAV

    Wordpress: .htaccess performance tricks

    These are performance tricks to improve your Wordpress application.
    Apache 13 views posted 5 years ago by chrisaiv
  11. FAV

    Error Logging in .htaccess

    This example shows you how to log errors to a file, and prevent showing them to the user. Make sure that the file exists and you're able to write to it.
    Bash 12 views posted 5 years ago by apphp-snippets
  12. FAV

    Remove File Extention from URLs in .htaccess

    This example shows you how to remove file extension from URLs using .htaccess file directives. Remember, that "mod_rewrite" works only on Apache server. Before trying please be sure that you are working on Apache server and the "mod_rewrite" module/e...
    PHP 12 views posted 6 years ago by apphp-snippets
  13. FAV

    Different Directory Index Page in .htaccess

    We know that normally index.html or index.php is the default page for many servers, when visitor types a directory without specifying a file name. You can change this rule with .htaccess:
    PHP 7 views posted 6 years ago by apphp-snippets
  14. FAV

    Redirect all users to access the site WITHOUT the \'www.\' prefix

    Redirect all users to access the site WITHOUT the 'www.' prefix
    Apache 11 views posted 6 years ago by graceman9
  15. FAV

    .htaccess tricks

    Several tricks for your .htaccess file.
    Other 12 views posted 6 years ago by telltec
  16. FAV

    .htaccess for Codeigniter in Wordpress subfolder

    Try to run Codeigniter in a subfolder of a Wordpress installation and want to remove index.php for clean URLs? Put this code in a .htaccess file in your codeigniter directory ("cidir" in this example).
    Other 24 views posted 7 years ago by telltec
  17. FAV

    .htaccess for wordpress network @wpengine - adds trailing slash to 404 pages

    In my WP networks, I use a custom 404 page and plugin to answer calls asking for user information from a custom api. The API requires a URL format like this: domain.com/username/ However, users don't ever type a trailing slash, nor should they, so...
    Apache 18 views posted 7 years ago by lucasoptura
  18. FAV

    Remove /index.php

    Removing index.php to url. e.g. www.yourwebsite.com/index.php -> www.yourwebsite.com/
    Apache 10 views posted 7 years ago by zwebapp
  19. FAV

    Perfect PHP .htaccess rewrites

    These two snippets together, the first in the .htaccess file, and the second in your PHP create an elegantly simple solution to arbitrary URLs with php. For a breakdown and example check out the link. Don't want to follow the link, how about the q...
    PHP 28 views posted 7 years ago by FatFolderDesigner
  20. FAV

    Remove .php from URL

    .htaccess
    Apache 23 views posted 7 years ago by wiryanm
  21. FAV

    .htaccess script to block remote access and allow local ip

    The below code lets you stop access from the remote IPs excluding your local machine IP. This code can be setup where someone wants to provide an internal access and restricting the external access for the web service. - [Automated Predictive Dial...
    Apache 20 views posted 7 years ago by aruldave
  22. FAV

    Remove trailing slashes in htaccess

    How to remove trailing slashes in URL's using .htaccess.
    Apache 10 views posted 7 years ago by palimadra
  23. FAV

    Prevent Image Hotlinking

    stop bandwidth theft!
    Apache saved by 2 people 17 views posted 8 years ago by ederfortunatO
  24. FAV

    Force www with htaccess

    Domain ambiguous way of forcing www with htaccess
    Apache 16 views posted 8 years ago by klovera
  25. FAV

    301er Weiterleitung

    Eine komplette Website mit Linkstruktur auf eine neue Domain weiterleiten
    Apache 9 views posted 8 years ago by Perun
  26. FAV

    Do not allow public viewing of directory indexes

    Do not allow public to see your dir structure just pleae this code in .htacces Futther reading There are two ways to approach this. The best way to do this is via your .htaccess or httpd.conf file (if you have your own Apache server). If your h...
    PHP 15 views posted 8 years ago by webtechdev
  27. FAV

    .htaccess php handler mod_rewrite

    This is an .htaccess file for a mod_rewrite php url handler.
    Apache 19 views posted 8 years ago by ghost2109
  28. FAV

    htaccess snippets

    .htaccess snippets to optimize your website in many ways: Redirections, performances, ease of use
    Apache saved by 2 people 26 views posted 8 years ago by macodev
  29. FAV

    Reduce spam on your WordPress blog by using .htaccess

    Reduce spam on WP installations (comment spam); this snippet does not look for https referers.
    Apache 30 views posted 8 years ago by no4h
  30. FAV

    How to: Protect your WordPress blog from hotlinking

    FWIW
    Apache 16 views posted 8 years ago by no4h
« Prev 1 2 3 4 5 ... 9