Example of some apache rewrite rules


/ Published in: Apache
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <Directory /var/www/vhosts/drupalr.co.uk/httpdocs>
  2. RewriteEngine on
  3. rewriterule ^(.+)\.htm$ /$1.php [r=301,nc]
  4.  
  5. RewriteRule ^community community.php [nc]
  6.  
  7. ErrorDocument 404 /index.php
  8. </Directory>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.