Hi, I want to add a PHP menu to my website but the tutorial I am reading states that I will need to save my index file as index.php (instead of .html). I'm just wondering if this will affect my search engine position or page rank at all? Do I have to save the file as .php for the menu to work? Thanks for any help, as you can see I am new to PHP...
what is the tutorial you are reading, if its online i will take a look, I know you can include php functions if you have the shtml extension eg index.shtml
try this: it came from this site http://www.theukwebdesigncompany.com/articles/article.php?article=314 Code (markup): Hope this helps.
Thanks Valdor, I will give this a go. If I upload the new index.shtml file will I need to delete my index.html file? Will this cause a change in SERPS? Thanks
changing from .html to .shtml is the same as changing from .html to .php if you are refering to your domain as domain.com without domain.com/index.html ... this will not cause any serp results . since index.(php | html | htm | asp | ..) is the default . the problem will occur if u change domain.com/test.html to domain.com/test.php and a solution for this is to use 301 redirection good luck
Or you can create a .htaccess file and add this: RewriteEngine on RewriteBase / RewriteRule ^(.*)\.html$ $1.php [R=permanent] Code (markup): and then you can rename your index to .php, but it will show to browsers, humans and SE's as .html. (this will show all pages that have {pagename here}.php to {pagename here}.html (although the "pagename here" will actually be the pagename!)) Regards, Marc
Instead of 301 redirection could I use the .htaccess file and do a redirect that way? I will be needing to change all of my pages from .html to .php Thanks for the help
If I put the redirect in my .htaccess file this way would it be okay?: redirect 301 /mypagename.html http://mywebsite.com/mypagename.php Would that work okay and keep the search engine position? Thanks for any help
I think it might affect it because all of the previous links to your site would be directed to the index.html, not .php, but it might work because the links might just be redirected automatically to the .php. But make sure you delete the index.html fully.