Skip to content

Instantly share code, notes, and snippets.

@daveaspinall
Last active November 27, 2015 08:40
Show Gist options
  • Select an option

  • Save daveaspinall/579152fa35f70bfc21e3 to your computer and use it in GitHub Desktop.

Select an option

Save daveaspinall/579152fa35f70bfc21e3 to your computer and use it in GitHub Desktop.

Revisions

  1. daveaspinall revised this gist Nov 27, 2015. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion .htaccess
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,11 @@
    <IfModule mod_rewrite.c>
    # Redirect upload requests to staging site
    RewriteEngine On
    # Redirect upload requests to staging site
    RewriteRule ^wp-content/uploads/(.*)$ http://staging.domain.com/wp-content/uploads/$1 [L,R=301]
    # WP redirects follow...
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
  2. daveaspinall revised this gist Nov 2, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions .htaccess
    Original file line number Diff line number Diff line change
    @@ -2,4 +2,5 @@
    # Redirect upload requests to staging site
    RewriteEngine On
    RewriteRule ^wp-content/uploads/(.*)$ http://staging.domain.com/wp-content/uploads/$1 [L,R=301]
    # WP redirects follow...
    </IfModule>
  3. daveaspinall revised this gist Oct 28, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .htaccess
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    <IfModule mod_rewrite.c>
    # Redirect upload requests to staging site
    RewriteEngine On
    RewriteRule ^wp-content/uploads/(.*)$ http://cahill-photo.staging.aws.carboncode.co.uk/wp-content/uploads/$1 [L,R=301]
    RewriteRule ^wp-content/uploads/(.*)$ http://staging.domain.com/wp-content/uploads/$1 [L,R=301]
    </IfModule>
  4. daveaspinall renamed this gist Oct 28, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  5. daveaspinall revised this gist Oct 28, 2015. No changes.
  6. daveaspinall renamed this gist Oct 28, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  7. daveaspinall created this gist Oct 28, 2015.
    5 changes: 5 additions & 0 deletions wp-uploads-redirect
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    <IfModule mod_rewrite.c>
    # Redirect upload requests to staging site
    RewriteEngine On
    RewriteRule ^wp-content/uploads/(.*)$ http://cahill-photo.staging.aws.carboncode.co.uk/wp-content/uploads/$1 [L,R=301]
    </IfModule>