Forum Moderators: phranque
I have a html website which I have a .htaccess file to take non wwws to www and index.htm to /, to prevent any duplicate content issues.
But back in January I started a blog.
It orginally did OK, with PR filtering through etc.
Now I have lost PR within the blog pages the exception of the blog homepage.
Then today a thought crossed my mind.
The blog is in PHP, in a seperate folder called /blog/
when I type in example.co.uk/blog/ and example/blog/index.htm
I get the same page, and these both have a pr of 4.
To me that means both pages have been found and I need to send all links to one version of this page.
So do I?
Add another rewrite, but this time php script to my existing .htaccess file in the root directory. If so, do you have a script?
Add another .htaccess file with a php script in to the blog folder
Or simply do a d301 in the existing root .htaccess
Advice needed
Many Thanks
Mark
Yes.
I don't understand your statement about "Add another rewrite, but this time php script to my existing .htaccess file in the root directory. If so, do you have a script?"
You need to add redirect code to either example.com/.htaccess or to example.com/blog/.htaccess. This code should redirect direct client requests for /index.html to / in all directories, or redirect (only) direct client request for /blog/index.html to /blog/
Which you should do depends on your server configuration and your preferences. The code has been posted many times [google.com] here.
Jim