Skip to content

Instantly share code, notes, and snippets.

@gybin02
Created April 18, 2017 10:26
Show Gist options
  • Save gybin02/f256c553f3fc2bcd77c1c26a7e557aa1 to your computer and use it in GitHub Desktop.
Save gybin02/f256c553f3fc2bcd77c1c26a7e557aa1 to your computer and use it in GitHub Desktop.
htaccess wordpress openshift
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.bp-china.com$ [NC]
RewriteRule ^(.*)$ http://www.bp-china.com$1 [L,R=301]
</IfModule>
@gybin02
Copy link
Author

gybin02 commented Apr 18, 2017

Origin:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

@gybin02
Copy link
Author

gybin02 commented Apr 18, 2017

最好成功的201 配置:

 <IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteCond %{HTTP_HOST} !^www.bp-china.com$ [NC]
RewriteRule ^(.*)$ http://www.bp-china.com$1 [L,R=301]
</IfModule>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment