Forum Moderators: phranque
These pages have a high page rank despite the naming convention problem, so I decided to implement a simple 301 redirect using .htaccess. The following command creates an internal server error when I post the .htaccess file (I assume it's the spaces):
I also tried, to account for the server-side formatting of the file name when the page with spaces is requested:
The previous method doesn't create an error, but it also doesn't redirect the file. I'm at a loss for how to resolve this problem.
[edited by: jdMorgan at 4:16 pm (utc) on July 11, 2007]
[edit reason] example.com, please. See Terms of Service. [/edit]
RedirectMatch 301 ^/i\%20am\%20a\%20good\%20cook\.htm$ http://www.example.com/i-am-a-good-cook.html
RedirectMatch 301 ^/i\ am\ a\ good\ cook\.htm$ http://www.example.com/i-am-a-good-cook.html
Jim
[edited by: jdMorgan at 4:40 pm (utc) on July 11, 2007]
My plan is to replace the files with spaces in the name with files that have dashes to separate the words. However, some of the %20-htm file names already have a high page rank assigned by the searched engines.
Starting over with a fresh naming convention works for the internal website linking; the 301 redirects are so that external links, from followers of the site, won't be broken.
@vincevincevince
When using the quotes, would this be an example of the proper format:
RedirectMatch 301 ^/"i am a good cook.htm$" http://www.example.com/i-am-a-good-cook.html