Oz Web Services
  • Home
  • WP
  • PHP
  • JS
  • CSS
  • SCSS
  • HTML
  • XML
  • JSON
  • SQL
  • .htaccess
  • Apache
  • Nginx
  • INI
  • HTTP
  • Diff
Search shortcode

Example: Apache

May 13, 2014
# rewrite`s rules for wordpress pretty url
LoadModule rewrite_module  modules/mod_rewrite.so
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [NC,L]

ExpiresActive On
ExpiresByType application/x-javascript  "access plus 1 days"

Order Deny,Allow
Allow from All

<Location /maps/>
	RewriteMap map txt:map.txt
	RewriteMap lower int:tolower
	RewriteCond %{REQUEST_URI} ^/([^/.]+)\.html$ [NC]
	RewriteCond ${map:${lower:%1}|NOT_FOUND} !NOT_FOUND
	RewriteRule .? /index.php?q=${map:${lower:%1}} [NC,L]
</Location>
Oz Web Services
Copyright © 2015-2025 All Rights Reserved