Forum Moderators: open
We're migrating our company's existing site to a cms. The cms homepage includes a "home/" folder within the url. This only occurs on the homepage:
(existing homepage) www.example.com
(cms homepage) www.example.com/home/
(cms product page) www.example.com/product-keywords-here/
My concerns include SE indexing, external links/directories, rankings and general user confusion about the new url. The developer claims they can't change the url back to www.example.com.
Are there rewrite options?
Thanks!
In that case, you could do a rewrite along the lines of
RewriteRule ^/?$ /home/ [L]
Note, that's *not* a redirect, but a rewrite. So it sends a 200 OK status code and the user's browser is at example.com and is not redirected to /home/
Since you're only using the /home/ part of the path because your developer can't fix that for you, I wouldn't redirect.
Still, seems strange the developer can't just move it.
So there's nothing below that right? No /home/page1 pages?
That's correct. Only the homepage.
Since you're only using the /home/ part of the path because your developer can't fix that for you, I wouldn't redirect.
What about the hundreds of external links and directory listings pointing to www.example.com -- won't the new homepage url (www.example.com/home/) affect our search engine rankings, page rank, link juice, etc?
Still, seems strange the developer can't just move it.
Yeah, really strange. Can't they move the content to the root?
What about the hundreds of external links and directory listings pointing to www.example.com
I didn't express myself clearly I guess. You have two options
- Rewrite: example.com returns a 200 OK and user never knows that he's actually reading example.com/home/. Address bar on browser still says example.com/ and search engines have no idea that the page has moved (which, actually, it hasn't because you're rewriting.
- Redirect: example.com returns a 302 or 301 (moved temporarily or permanently) and user gets redirected and sees example.com/home in the browser address bar. Search engines get told (in case of 301) to remove example.com from the index and replace it with example.com/home/
So that's why I say use a rewrite. From the user and SE perspective, the address is still example.com/ just like always. Only the admins and so forth end up having to deal with the issue.
Also, you'll have to keep in mind that your rewrite needs to take into parameters like session IDs if applicable (that is to say if there will be calls to the home page that have components after the example.com or example.com/ you'll have to account for that in your rewrites). Currently my rewrite assumes if anyone has anything other than a slash after the domain name, they want a page other than the home page.
The 'thing' on the left side of the rule is a URL-path. The 'thing' on the right side is a filepath. URLs and files are not the same thing; They are only 'associated' by the action of the server, and we're now using mod_rewrite to do an internal rewrite to change that URL-to-filepath association, without changing either the URL or the filepath.
Jim