Skip to content

Instantly share code, notes, and snippets.

@nemf
Created April 1, 2012 08:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nemf/2273623 to your computer and use it in GitHub Desktop.
Save nemf/2273623 to your computer and use it in GitHub Desktop.
mod_rewrite in .htaccess
# document_root/pmp/.htaccess
# NG
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/pmp(.*)$ http://pmp.nemf.quickboy.com/$1 [R=301,L]
</IfModule>
# document_root/pmp/.htaccess
# OK
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ http://pmp.nemf.quickboy.com/$1 [R=301,L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment