Forum Moderators: phranque
I need to redirect [mydomain...] to [mydomain...] (I just need to drop the resizeiframe.htm from any url)
Thank you to anyone who can help (without lambasting me for using a plugin instead of codding directly)
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
RedirectMatch 301 ^/([^/]+)+)/resizeiframe\.htm$ http://example.com/$1/
# END WordPress
I am sure that I am doing something dumb here, but could use a hand...
RewriteEngine on
RewriteBase /
#
# Externally redirect requests for "resizeiframe.htm" in any directory
# to the root of that same directory
RewriteRule ^([^/]+/)*)resizeiframe\.htm$ http://example.com/$1/ [R=301,L]
#
# BEGIN WordPress
# Internally rewrite any and all requests for non-blank URLs which do not
# resolve to an existing file or directory to the WordPress script
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
I deleted the <IfModule> stuff. That is only meant to make the code fail silently on servers where mod_rewrite is not installed, and there is no need for it once the WP code is installed and working on your server.
Jim
Thanks a ton for the support...still not working. Here is teh .htaccess as it is on my site, now...
RewriteEngine on
RewriteBase /
#
# Externally redirect requests for "resizeIframe.htm" in any directory
# to the root of that same directory
RewriteRule ^([^/]+/)*)resizeIframe\.htm$ http://example.com/$1/ [R=301,L]
#
# BEGIN WordPress
# Internally rewrite any and all requests for non-blank URLs which do not
# resolve to an existing file or directory to the WordPress script
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
In the event that I just not explaining myself well... here it goes again..
I want to redirect any url, this could be www.mydomain.com/category/resizeIframe.com or www.mydomain.com/category/pagename/resizeIframe.com or
www.mydomain.com/category/category/resizeIframe.com or
www.mydomain.com/category/category/pagename/resizeIframe.com
to EXACTLY the same url without the /resizeIframe.htm
Thanks, again for any help.