Forum Moderators: phranque
I have decided to take the unpleasant step of renaming the majority of my dynamic pages to append the .html extension, and I will need to 301 all of the old pages. Currently all of the pages end in a trailing slash, i.e.:
example.com/photos/category/pagename/
through the CMS url rewrite module the new urls will be:
example.com/photos/category/pagename.html
I have created a rewrite rule to 301 all of the old pagenames to the new ones but it crashes my server without fail so there's something that I have done wrong:
RewriteRule ^(photos/)?category/([^.]+)/$
http://example.com/photos/category/$2\.html [R=301,L]
Can anyone please point out what the problem might be?
Thanks!
[edited by: jdMorgan at 10:27 pm (utc) on Dec. 18, 2007]
[edit reason] example.com [/edit]
RewriteRule ^(photos/)?category/([^.]+)/$ http://example.com/photos/category/$2.html [R=301,L]
Jim
I tried the new code and it works now, but only if I structure the syntax of the rewrite module in a specific way. This has something to do with the internal programming of how the CMS handles url generation and not what it writes to the htaccess file. In order to get this to work I had to disable the rewriting of page numbers though, so whereas before the page numbers before were photos/category/2 for example, now it's written photos/category.html?g2_page=2 which is rather inelegant. I'll have to now rewrite the old pretty page number urls to the new dynamic ones, which is not the best solution. I'll have to think about this a bit more and I will post here if I have problems. Thanks for the help!
I am not sure why you have added the ".html" on the end of those URLs. What did you want to achieve?I much prefer URLs that look like folder-index URLs, as they are completely "technology independent".
I agree it's a drastic measure, but I don't really know what else to do to get my internal links indexed and counted. I have plenty of external IBLs pointing to my main page and category pages and a PR of 3-5 on my main and category pages, but it's just not circulating around the site and trickling down in any way. That's caused 90% of my pages to fall into supplementals.
For instance, the first page of every category in my site has page rank of 3-4, but the 2nd-xth pages have no rank at all. When I look at my competitors' sites they have the same or lower PR, yet all of their internal pages are counted as backlinks to each other. Most of those pages have no external backlinks, just internal ones. I have noticed that they all seem to use the .html extension with their dynamic pages though, which I don't. My lowest level pages end in a trailing slash as I posted above. My site architecture is fine and I have checked it out with Xenu, so I can only surmise that maybe Google just doesn't like these types of URLs? At this point I'll try pretty much anything to get the internal link juice flowing properly on my site.
It makes sense that that page would have rank and be counted. However, the subsequent pages have never developed pagerank across the board and only some of them are counted in my internal backlinks even though they all interlink. It could be that pages 1,4,5,7 have PR and they are shown as having backlinks, while pages 2,3,6,9 have none. I do not see any external backlinks pointing to the category pages which are counted so it's a mystery to me. There is definitely something not right though. BTW, I tried to stickymail you earlier but your box is full. Thanks!