Forum Moderators: phranque
redirect 301 /some-page/ http://example.com/another-page/ (I didn't post those because I have a few too many : ) RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
redirect 301 /archives/10-college- majors/ http://example.com/archives/10-college-majors/
redirect 301 /archives/10-college-%20majors/ http://example.com/archives/10-college-majors/
redirect 301 /archives/10-college-%C2%A0majors/ http://example.com/archives/10-college-majors/
redirect 301 "/archives/10-college- majors/" http://example.com/archives/10-college-majors/ http://example.com/archives/10-college- majors/ http://example.com/archives/10-college-%C2%A0majors/ Change the Redirect rules to use RewriteRule with the [R=301,L] flags and move them to the top of the file.
RewriteRule ^/archives/10-college-\ majors/ http://example.com/archives/10-college-majors/ [R=301,L] <-- code would be before all else in the .htaccess file / with space or or %C2%A0 or something entirely different? I said I can do simple redirects, but it seems even those aren't proper :-) RewriteRule ^/archives/10-college-\ majors/ http://example.com/archives/10-college-majors/ [R=301,L]
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress RewriteRule ^/archives/10-college-(\ |%20)majors/ http://example.com/archives/10-college-majors/ [R=301,L]
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress RewriteEngine On (in different orders). RewriteEngine On
RewriteRule ^archives/10-college-(\ |%20)majors/ http://example.com/archives/10-college-majors/ [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress RewriteEngine On
RewriteRule ^archives/10-college-(\ |%20)majors/ http://example.com/archives/10-college-majors/
[R=301,L]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L] RewriteEngine On
RewriteRule ^archives/10-college-(\ |%20)majors/ http://example.com/archives/10-college-majors/ [R=301,L]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]