regex - How to redirect to other host using mod_rewrite in Apache -
i need create rewrite rule mod_rewrite in apache it's hard me understand whole syntax.
i have links such as:
http://www.example.com/0001/images/image1.gif and need them redirect other server like:
http://127.127.127.127/0001/images/image1.gif is achievable?
on example.com enable mod_rewrite , .htaccess through httpd.conf , put code in .htaccess under document_root directory:
options +followsymlinks -multiviews # turn mod_rewrite on rewriteengine on rewritebase / rewritecond %{http_host} ^(www\.)example\.com$ [nc] rewriterule ^ http://127.127.127.127%{request_uri} [r=301,l]
Comments
Post a Comment