Created
January 11, 2016 00:42
-
-
Save seanwalsh/e0d7a69b1fd9777bceda to your computer and use it in GitHub Desktop.
demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
# REWRITE FROM WWW.EXAMPLE.COM TO EXAMPLE.COM | |
RewriteCond %{HTTP_HOST} ^www.example.com$ [NC] | |
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L] | |
# REDIRECT HOMEPAGE TO /THIS-WEEK/ UNTIL HOMEPAGE IS CREATED | |
Redirect /index.php http://example.com/this-week/ | |
#REWRITE ITEM/? TO THE INDEX FILE | |
RewriteRule ^item/([^/\.]+)/?$ item/index.php?id=$1 [L] | |
# REWRITE THE 404 IMAGE ERROR TO DISPLAY OUR ERROR IMAGE | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_URI} \.(gif|jpg|jpeg|png)$ | |
RewriteRule .* _assets/images/missing.png [L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment