Welcome To Snipplr
Everyone's Recent Apache Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
How to set the PHP maximum execution time and script memory limit in an .htaccess file
0
2722
posted 1 year ago by cerxx
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...
0
322
posted 2 years ago by cerxx
This .htaccess actually forces all traffic to https, and allows cakephp app to work properly, as well as letsencrypt to go thru
0
367
posted 3 years ago by acosonic
Removing extensions and trailing slashes in web urls:
"If you want to remove the .html extension from a html file for example yoursite.com/wallpaper.html to yoursite.com/wallpaper you simply have to alter the last line from the code above to match...
0
340
posted 5 years ago by jefferis
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.
0
404
posted 5 years ago by jefferis
Sometimes you don't want robots snooping around certain files. Here's one example of a custom configuration.
0
244
posted 6 years ago by chrisaiv
These are performance tricks to improve your Wordpress application.
0
270
posted 6 years ago by chrisaiv
Redirect all users to access the site WITHOUT the 'www.' prefix
0
277
posted 7 years ago by graceman9
To fix the issue with localhost under Windows 8 giving a 403 error (but working for 127.0.0.1) I did the following:
0
366
posted 8 years ago by rickygri
The idea is to use this piece of code inside a virtualhost block
0
283
posted 8 years ago by therobot
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...
0
369
posted 8 years ago by lucasoptura
Removing index.php to url.
e.g. www.yourwebsite.com/index.php -> www.yourwebsite.com/
0
195
posted 8 years ago by zwebapp
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...
0
362
posted 8 years ago by aruldave
Eine komplette Website mit Linkstruktur auf eine neue Domain weiterleiten
0
247
posted 9 years ago by Perun
.htaccess snippets to optimize your website in many ways: Redirections, performances, ease of use
2
289
posted 9 years ago by macodev
Reduce spam on WP installations (comment spam); this snippet does not look for https referers.
0
361
posted 9 years ago by no4h
Rewrites url to appear like the additional domain appears independently hosted, however, only appropriate for a temporary web page as other pages throw an error.
0
294
posted 9 years ago by hotdiggity
This snippet will stop people from snooping in your Apache directories. This is useful if you have directories containing files, but no index HTML/PHP document.
1
252
posted 9 years ago by f6design