Skip to content

Rage Against the Shell

Linux tips and other things…

  • Home
  • Contact
  • Privacy Policy

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 Apache

Post navigation

Separate varnishncsa logs per domain
Getting the parent process pid

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Calendar

October 2018
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031  
« Feb   Dec »

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.