Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save omurphy27/ca7043bfdbf0879f63d7 to your computer and use it in GitHub Desktop.
Save omurphy27/ca7043bfdbf0879f63d7 to your computer and use it in GitHub Desktop.
HTAccess redirectmatch 301 - redirecting entire directories.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
RedirectMatch 301 ^/nba/.*$ http://oddsfather.com/
RedirectMatch 301 ^/NBA/.*$ http://oddsfather.com/
RedirectMatch 301 ^/NCAAB/.*$ http://oddsfather.com/
RedirectMatch 301 ^/event/.*$ http://oddsfather.com/
RedirectMatch 301 ^/mlb/.*$ http://oddsfather.com/
RedirectMatch 301 ^/ncaaf/.*$ http://oddsfather.com/
RedirectMatch 301 ^/ncaab/.*$ http://oddsfather.com/
RedirectMatch 301 ^/nfl/.*$ http://oddsfather.com/
RedirectMatch 301 ^/nhl/.*$ http://oddsfather.com/
RedirectMatch 301 ^/report/.*$ http://oddsfather.com/
RedirectMatch 301 ^/team/.*$ http://oddsfather.com/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment