Forum Moderators: phranque
You followed a link on Instagram that redirects to: http://example.com. Remember, only follow links from sources that you trust. We are showing you this message because our systems detected that it may not take you to where you want to go.
RewriteCond %{HTTP_HOST} ^www\.(([a-z0-9_]+\.)?example\.com)$ [NC]
RewriteRule .? http://%1%{REQUEST_URI} [R=301,L] You followed a link on Instagram that redirects to: http://example.com.
...saying that my site redirects them.
If the link URL and the site it redirects to is the same, then that doesn't really make sense IMO.
I'm no expert but I don't think your rule is doing what you want it to do.
The basic rule usually looks something like:
RewriteCond %{HTTP_HOST} !^(example\.com)?$
RewriteRule (.*) http://example.com/$1 [R=301,L]
I'm no expert but I don't think your rule is doing what you want it to do.
Interesting. I don't know anything about canonical redirects.
RewriteCond %{HTTP_HOST} !^example\.com$ [NC]
RewriteRule (.*) http://example.com/$1 [R=301,L] RewriteRule ^index\.html$ / [R=301,L] ...as well as added "[NC]".
RewriteRule ^index\.html$ / [R=301,L]
Forgive my ignorance. What does that do?
# SETUP
IndexOptions +Charset=UTF-8
RewriteEngine On
# SECTION 1: BLOCK BAD REQUESTS
# None
# SECTION 2: EXTERNAL REDIRECTS
RewriteRule ^index\.html$ / [R=301,L]
RewriteCond %{HTTP_HOST} !^example\.com$
RewriteRule (.*) http://example.com/$1 [R=301,L]
# SECTION 3: INTERNAL REWRITES
RewriteRule ^category/([/_0-9a-zA-Z-]+)$ /category.php?id=$1 [L]
RewriteRule ^article/([/_0-9a-zA-Z-]+)$ /article.php?id=$1 [L]
RewriteRule ^index\.html$ http://example.com/ [R=301,L]