|change so that url does not match the website's files location|
I have this doubt.
1. we have a domain called www.domainx.com
2. all the website content is under a folder called "blogx" containing a wordpress blog.
3. the folder blogx is under the root of domainx.
4. the .htaccess file has a directive like "DirectoryIndex /blogx" so that every visit to www.domainx.com is redirected towards www.domainx.com/blogx displaying a website according to the contents of the wordpress blog stored under blogx folder.
Having said so,
We would like to change this website behaviour so that whenever any user went to the url called www.domainx.com, then the behaviour was the following:
1. The url seen by the user would not change to www.domainx.com/blogx like I described above but it would keep showing only www.domainx.com
2. The website displayed by the browser would still be the same, that is to say, the wordpress blog stored under the "blogx" folder even though the url seen by the user would be telling just www.domainx.com
Do you know any way to accomplish this? Moreover, do you know anyway that search engines as Google would not penalize?
Thanks a lot
With DirectoryIndex /blogx, the behavior should be what you desire -- DirectoryIndex *is NOT* a redirect, it is an internal rewrite -- a URL-to-filepath mapping which occurs strictly inside the server.
So the question becomes, "What other code do you have on this server that is exposing the /blogx filepath as a URL?"
It could be mod_rewrite, mod_alias, mod_dir, mod_negotiation, or even the blog code itself that is invoking an external redirect which exposes the /blogx filepath to the client, but it is not the DirectoryIndex directive that is doing this.
You could use the "Live HTTP Headers" (or similar) add-on for Firefox to confirm this redirect. The context in which you see the redirect occur may give you clues about what 'agent' is invoking it. Examining the client and server headers correlating them with the entries in your raw server access log may prove helpful.
If you don't see any redirects in the HTTP transaction display, then perhaps it is simply that your blog is not configured properly and is showing its own subdirectory in the links that it publishes on your Web pages. This would indicate that it's not "installed" correctly -- The wrong installation option was likely selected.
Don't worry so much about Google "penalties." Most of these so-called "penalties" are self-inflicted damage due to bad Web site implementation or lack of useful content, and not penalties.
The major search engines reserve penalties for really, really bad violations of their 'rules' and for those which *truly* deserve to be penalized. However, some Webmasters who don't know enough to set up their servers correctly, or who will not admit that they have spammy, low-quality, or useless Web sites find it simpler to imagine a mysterious "penalty" so that they can blame someone else for their problems... and they often post to public forums about it. So the myth of the "penalties" grows with time...
Most of our Web sites are far too small, or our "violations" far too trivial, for Google to bother with a "special penalty just for our site."
Setting up a blog in a separate subdirectory filespace so that it is easier to manage the site certainly does not constitute an offense deserving a penalty. Millions of sites are set up this way, including many that I've worked on. This is not a concern.