Forum Moderators: Robert Charlton & goodroi
my keyword was bringing about 300 to 500 unique visitors a now, not that's all gone.
That was the only change I recall that could have affected that. I did my fair share of searching the web to see if there has ever been similar problems but to no avail. Has anyone ever experienced this? or know if it will be rectified?
Any direct request for a named index file should be served a 301 redirect back to a URL with the index file filename omitted, simply ending with a trailing / at the end. There are hundreds of threads about that in the Apache forum here.
In any case, should that have been some filename other than index.html then you could have simply set up an internal server rewrite such that when thatfile.html was requested, the content was silently delivered by thatfile.php without exposing the name of that file.
URLs do not have to depend on the filenames that reside on your server.
In that case, absolutely not. You're making things worse.
.
By adding your redirect, you might be preserving some traffic in the short term.
In the long term you are still serving Duplicate Content at www.domain.com/index.php and at www.domain.com/ and that will cost you.
.
Link to "www.domain.com/" so that search engines index that URL.
Use .htaccess to redirect named index files:
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]*/)*index\.(html?¦php¦cgi¦cfm¦pl¦aspx?¦jspx?).*\ HTTP/
RewriteRule ^(([^/]*/)*)index\.(html?¦php¦cgi¦cfm¦pl¦aspx?¦jspx?)$ http://www.domain.com/$1? [R=301,L]
Beware that you will need to change each ¦ to be the proper pipe symbol before using this code.
my site never did say www.domain.com/index.html or www.domain.com/index.php in the browser. All I did was delete index.html and and started using index.php
or are you saying all back links should be www.domain.com/?
are you saying to rename /public_html/ folder to www.domain.com/?
my site never did say www.domain.com/index.html or www.domain.com/index.php in the browser.
All I did was delete index.html and and started using index.php
or are you saying all back links should be www.domain.com/?
Does that clarify?
I suppose my real issue is I don't understand why goolge isn't seeing index.php...does the .htaccess redirect solve that?
[edited by: tedster at 7:08 pm (utc) on Sep. 10, 2008]
[edit reason] switch to example.com - it can never be owned [/edit]
<a href="/"></a> or <a href="http://www.mydomain.com/"></a>
instead of
<a href="/index.whatever"></a>
Use the same method for linking to folders that have a default / root / index file i.e.
<a href="/foldername/"></a>
and not
<a href="/foldername/index.whatever"></a>
I assumed that deleting my index.html file and adding index.php was the reason for me going from a page 1 rank of the keyword, to a 0 page rank.
I suppose to need to sharpen up on my website skills because I have no indea what is meant by DirectoryIndex directive
As it stands, what does the .htaccess redirect do?
fishfinger...Thanks, I've always used <a href="http://www.mydomain.com/"></a> and not <a href="/index.whatever"></a>
I guess that was why I was so confused with what i was being asked to do
[edited by: ArronC at 9:10 pm (utc) on Sep. 10, 2008]
I just thought you should know
I'm getting use to accepting my losses
[edited by: ArronC at 9:11 am (utc) on Sep. 12, 2008]
RewriteCond - the "command"
%{REQUEST_URI} - the thing you are testing
! - this means "NOT"
^ - this means "begins with"
admin - the actual path it will apply to.
.
Put it all together and you get something like:
RewriteCond %{REQUEST_URI} !^admin
and that line goes immediately before the rule that is causing you the problem at the moment.
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]*/)*index\.(html?¦php¦cgi¦cfm¦pl¦aspx?¦jspx?).*\ HTTP/
RewriteCond %{REQUEST_URI} !^/forum/adm/
RewriteRule ^(([^/]*/)*)index\.(html?¦php¦cgi¦cfm¦pl¦aspx?¦jspx?)$ http://www.example.com/$1? [R=301,L]
you must really love this
:D
Thank you