i have a php code when i insert that code in my index.php it works great ...but it will not work in index.html as i want that code to work in index.html ..i tried my best to fix this problem.. i even rename the index.php to index.html after renaming the index.php to index.html the output of the code will not appear but i see some input code which i dont want.please help me with this..i will be very thank full to u guys..
Ok you have two options here and i suggest the first enable modrewrite and add this to your .htaccess for this sites folder <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^index.html index.php [QSA,L] </IfModule> Will rewrite the url to that file. Now if you want ALL html to be pre processed by php then you will need to do this: if you are able to edit your httpd.conf for apache you can change AddType application/x-httpd-php .php .php3 .php4 by adding .html there. .html is mentioned again in your conf so you will need to comment that out and restart apache
I'm not sure this person understand the bascis .. index.html and index.php will both work as the site index page, if you want to use php in any page then you must call the page .php instead of .html If you wanted your site to be index.html and use php in that file then you must call the file index.php, and then use mod-rewrite (as above) to allow users to type in index.html to display the index.php. ....Simple!
you are absolutly wrong Mr danthorpe2002 even i thought that index.php will also work as index page but its not...it cheaks for index.html or index.htm ha not index.php well even iam familier to php i already done the steps what u told but it was not working well i need php guru"s ha like "hallent" well but i appreciate u r comment thank you danthorpe2002
Well MostPlays.com seems to work fine and the index file in that is index.php I code all my sites from scratch in php so please don't try and tell me I don't know what I'm talking about. I don't take kindly to insulting comments when offering help, I also don't tolerate arrogance, have some rep-.
hey ashducati: np which method did you go with? hey dan: I dont think he was trying to insult you. You are right, I dont think he understood differences between why index.html and php performed differently. I was only trying to give a quick solution to the problem H
Hey, Yep exactly the same, spared a minute of my life to try and help and his reply was basically - ha your wrong you don't know what your doing. Didn't think such a reply was needed so rep- and no help in the future.
hey dan am really sorry if i had hurted you...actually my intension was not to hurt you any ways..please dont feel bad..i applogise for everything happened ...take care