Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

old urls won't redirect shtml

shtml folder redirect



1:04 pm on Nov 9, 2011 (gmt 0)

I am rebuilding a site that was shtml, there are folders with index pages whose urls look like: [creativeloansnationwide.com...]
they are indexed like that in google webmaster list, the file that displays is actually about/index.shtml,(new page is index.html) but when I try to redirect to the new page
redirect 301 /about/ http://example.com/about/index.html I get a bad response:

http://example.com/about/index.htmlindex.htmlindex.htmlindex.htmlindex.html index.htmlindex.htmlindex.htmlindex.htmlindex.html index.htmlindex.htmlindex.htmlindex.htmlindex.html index.htmlindex.htmlindex.htmlindex.htmlindex.html? sef_rewrite=1&sef_rewrite=1&sef_rewrite=1&sef_rewrite=1 &sef_rewrite=1&sef_rewrite=1&sef_rewrite=1&sef_rewrite=1 &sef_rewrite=1&sef_rewrite=1&sef_rewrite=1&sef_rewrite=1 &sef_rewrite=1&sef_rewrite=1&sef_rewrite=1&sef_rewrite=1 &sef_rewrite=1&sef_rewrite=1&sef_rewrite=1

If I use this next redirect
redirect 301 /about/index.shtml http://example.com/about/index.html
the page redirects, but the links are indexed in google as /about/ (with no page name) and this link below will not redirect with the above htaccess in place
example.com/about/ (this is how they are indexed)
Thank you so much for any help, some pages are shtml and some are not so I am just redirecting about 6 pages like this if I can find out how.

[edited by: jatar_k at 1:18 pm (utc) on Nov 9, 2011]
[edit reason] changed to example.com so code is readable [/edit]


1:16 pm on Nov 9, 2011 (gmt 0)

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

for changing the index page you should be able to look at the DirectoryIndex, I think that's the one, and make apache look for index.html before index.shtml as the index page in a directory

that way if you have made an index.html it will use that, other wise it will continue to use the old one.


1:45 pm on Nov 9, 2011 (gmt 0)

I just changed the htaccess to
redirect 301 /about/index.html [creativeloansnationwide.com...]

and got a 500 Server error when I type this in

(that is the url I need to redirect)


2:32 pm on Nov 9, 2011 (gmt 0)

Ok I got it, I just rename the new pages .shtml and I don't even need redirects, thanks!


7:36 pm on Nov 9, 2011 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

You might be able to use DiretoryIndex. If not, an internal rewrite might be needed.

A redirect is likely not needed, but if it is, use a RewriteRule with the [R=301,L] flags and not Redirect or RedirectMatch.

Featured Threads

Hot Threads This Week

Hot Threads This Month