/ Published in: Bash
Expand |
Embed | Plain Text
#Rewrite Engine on code - MUST BE ACTIVE for rewrites and redirects to work Options +FollowSymLinks RewriteEngine on ## Error Handling - Note to preserve error stratus DO NOT use full URLs ErrorDocument 401 /401.html ErrorDocument 403 /403.html ErrorDocument 404 /404.html ErrorDocument 500 /500.html ErrorDocument 400 /400.html ## Force a file to download with a "Save As" ## #AddType application/octet-stream .doc .mov .avi .pdf .xls .mp4 #rewrites #admin redirect RewriteRule ^admin/$ admin/index.php [NC,L] #remove php extension using a trailing forward slash RewriteRule ^([^\.]+)/$ $1.php [NC,L] #test.php?start=2 test/start/1/ RewriteRule ^([^/]+)/([^/]+)/([0-9]+)/$ $1.php?$2=$3 [NC,L] RewriteRule ^suppliers/([0-9]+)/([^/]+)/$ suppliers.php?id=$1 [NC,L]
You need to login to post a comment.
