For URLS, better to use folders or long file names?
-
This post is deleted! -
You don't want to do a URL rewrite, you'll want to create a 301 redirect from the old URL to the new one.
That said, I personally feel the subfolders look better as URLs in the examples that you gave. The subfolder looks less spammy to me because it's serving to organize information, rather than to stuff keywords, which is how the all-hyphens examples look to me. At this level, with a single subfolder and file names that aren't extremely long, it shouldn't make a huge difference in terms of SEO - in my opinion it's more about appearances to human visitors.
In regards to making the PHP conversion easier, I assume you're referring to relative paths on PHP includes (e.g. ../includes/sidebar.php)? If that's the case I would just switch them to absolute rather than relative paths.
-
Thanks for your help. Not sure I understand what you mean by the URL rewrite. I'd either be rewriting the page to display as html with the slash or with the same exact name as the php file but with a html extension. If I rewrite using the slash, it will be the same URL, so no need for a 301. Not sure I follow you.
I agree with everything you said about using subfolders, and ultimately that's what I'm going to do. The long URLs do look spammy to me, but after doing SEO in the legal field for a couple of years, I don't think I've seen a law firm site that isn't spammy altogether - but that's beside the point.
As for relative vs. absolute paths - yes, your example is what I'm referring to. I've never understood using absolute in the code because how would I make edits in test? I do use it for home page links to help avoid the ".com" vs. "com/index.html" issue but I always find myself going out to the live site while clicking around in test without realizing it. Was wondering how people test that use absolute links.
-
Re: the rewrite, I may have misunderstood; I was suggesting that if you were planning to rewrite the URL of newfile.php to look like originalfile.html, then a redirect would have been easier for the overall management of the site. You can also enable .html files to use php includes: http://www.ntchosting.com/php/php-in-html.html
Yeah - law firm SEO can be a bit dirty. Still, with an industry that requires high trust from clients, the spammy urls just aren't worth it to me - I think the conversion cost is higher than many people would estimate.
Regarding using absolute in a test environment, it's rarely an issue for me on small biz sites so I paste the IP instead of the live domain on a page by page basis. Yoast wrote a good article last month regarding the troubles with relative url paths: http://yoast.com/relative-urls-issues/