Skip to content

Rage Against the Shell

Linux tips and other things…

  • Home
  • Contact
  • Privacy Policy

Category: Apache

Special characters in URL rewrite with mod_rewrite

Posted on October 10, 2018 - October 12, 2018 by Mr. Reboot

Tested in debian 8 / Apache 2.4.10

In apache enviroment with mod_rewrite, you can use the flag NE (no escape) for rewriting urls con special characters like #, ?, & … , example:

RewriteEngine On
RewriteRule ^(.*)$ "http://domain.com/#tag" [R=301,NC,L,NE]

R=301: type of redirection, 301 in this case
NC: no case or case insensitive
L: stop processing the rule set, like “break” in C

Posted in ApacheLeave a comment

Custom errors in apache + php-fpm

Posted on December 13, 2016 by Mr. Reboot

Tested in Apache 2.4 / PHP-FPM 5.6

By default php-fpm shows “File not found” when someone try to request a php file that doesn’t exist. If you use php-fpm in apache with mod_proxy for using custom errors just configure this in apache2.conf:

ProxyErrorOverride on
Posted in ApacheLeave a comment

Search

Calendar

February 2023
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728  
« Jan    

Categories

  • Apache
  • Cisco
  • Command line
  • Distros
  • Dovecot
  • File systems
  • Gadgets
  • GlusterFS
  • MySQL
  • Nginx
  • NTP
  • Opendkim
  • Pacemaker + Corosync
  • Postfix
  • Raspberrypi
  • SSH
  • SSL
  • Varnish

RSS RSS

  • Using qrencode January 16, 2022
  • Compile varnish module vmod_vsthrottle April 22, 2020
  • SSH vpn with sshuttle April 9, 2020
  • Disable swap in systemd December 16, 2019
  • Getting the parent process pid October 12, 2018
Proudly powered by WordPress | Theme: micro, developed by DevriX.