PicnicTutorials Posted February 5, 2011 Report Share Posted February 5, 2011 (edited) Will WAMP local testing work with .html ext with .htaccess enabled includes? Dont know if I worded that right but via my .htaccess code I run php with .html extensions. This is done at the server level obviously. But now I have so many includes my local testing sort of sucks (very little shows) so I want to setup WAMP again. But I'm thinking it wont work - or will it??? What do you think before I go to all the trouble to needlessly set it up? Edited February 5, 2011 by Eric Quote Link to comment Share on other sites More sharing options...
falkencreative Posted February 5, 2011 Report Share Posted February 5, 2011 I don't think it will, since .htaccess files only work on Linux based computers (Linux/Mac). Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted February 5, 2011 Author Report Share Posted February 5, 2011 Bummer. I'll just fudge it then for testing and put in fixed heights on the pertinent containers. Thanks for the info. Quote Link to comment Share on other sites More sharing options...
newseed Posted February 5, 2011 Report Share Posted February 5, 2011 I agree. It's never worked for me. Quote Link to comment Share on other sites More sharing options...
newseed Posted February 5, 2011 Report Share Posted February 5, 2011 (edited) Update: I did a quick search on this and found the following: Go to Wamp -> Left click at icon in the taskbar -> Click Config files -> httpd.confA file will be opened. Search rewrite in it. You will get: #LoadModule rewrite_module modules/mod_rewrite.soRemove hash from the beginning (Uncomment it) e.g. LoadModule rewrite_module modules/mod_rewrite.so Read more: http://www.phpmagicbook.com/allow-htaccess-and-mod-rewrite-in-wamp/#ixzz1D7thwkFX Seems to me that the mod rewrite has to be enabled. Not sure if this will solve the problem but it's worth a shot. Edit: ...and then I found this brief post that applies the same method as above. Edited February 5, 2011 by Eddie Quote Link to comment Share on other sites More sharing options...
falkencreative Posted February 5, 2011 Report Share Posted February 5, 2011 Huh. Good to know. I was under the impression that Windows couldn't understand those files at all, but I suppose they are just basic text files... I'll have to try this. Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted February 5, 2011 Author Report Share Posted February 5, 2011 (edited) I will give this a try thanks Eddie. On a side note. This site is so awesomely coded now. What before took like ten nested tables... Now I just floated all like three containers and and overflow hiddened/gave width the wrap. So clean and simple. ...and PIE.htc by default provides ie6 png fixes. So I was able to get rid of all those expressions. Edited February 5, 2011 by Eric Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted February 5, 2011 Author Report Share Posted February 5, 2011 (edited) Ben one more thing please? So I understand correctly. You get the error message in ie6 >> you push ok >> and it finishes loading right? Or does it just completely abort? Because no matter what I do I can't duplicate this on my machine again. Edit: oops I got my threads mixed up o well. Edited February 5, 2011 by Eric Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted February 7, 2011 Author Report Share Posted February 7, 2011 (edited) did you guys test any of this? I finally got wamp settup and set it to my virtual directory (which is cool). But I still cant run the php. I tried this simple one too but no go yet. http://kckb.wordpress.com/2009/06/08/wamp-server-and-htaccess-sef/ and I just tried the full tut from your link eddie and no go. I removed the # and added that bit to the .htacces. No luck. Anything you think Im missing? This would be very cool to have. Edited February 7, 2011 by Eric Quote Link to comment Share on other sites More sharing options...
newseed Posted February 7, 2011 Report Share Posted February 7, 2011 Sorry Eric. I have not tested this. You may have to go the WAMP forum to see if there are any solutions that might have been missed. Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted February 7, 2011 Author Report Share Posted February 7, 2011 (edited) Yeah I realize testing that is a bit involved. Via this search I found some good results. I read through them (on my phone) and they look good. I will try out all those... http://www.google.com/m/search?oe=UTF-8&client=safari&hl=en&aq=f&oq=&aqi=-k0d0t0&fkt=3923&fsdt=14027&htf=&his=&q=php+in+html+in+wamp I've never actually had a local server testing suite before. I just always used DW launch in browser and ignored the fact that my includes didn't show. But now it's most of this site so I can't just ignore it. It will be real nice if I can figure this out. Edited February 7, 2011 by Eric Quote Link to comment Share on other sites More sharing options...
newseed Posted February 7, 2011 Report Share Posted February 7, 2011 Update: I found this. You may have edited the file in the folder and so you might try checking the other folder(s). Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted February 8, 2011 Author Report Share Posted February 8, 2011 (edited) Alright! Man I haven't got excited like this since back in the day. I got it working! I found two ways to make it work. Im using the second one. The reason this link http://www.phpmagicbook.com/allow-htaccess-and-mod-rewrite-in-wamp/#ixzz1D7thwkFX wasnt originally working for me was because my .htaccess code was php5. It works perfect if I changed it to just php. and took off the #. The second way - the one i'm using was answered here http://stackoverflow.com/questions/4352483/html-not-parsing-as-php-in-wamp. See the last answer. open your httpd.conf file scroll down about 2/3 down and add the bit in bold <IfModule mime_module> AddType application/x-httpd-php .php AddType application/x-httpd-php .html AddType application/x-httpd-php .htm AddType application/x-httpd-php .txt </IfModule> YES! My life just got better. Edited February 8, 2011 by Eric Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted February 8, 2011 Author Report Share Posted February 8, 2011 Then I set up my virtual directory by folowing this tut. This way I dont have to move my development files. I just simply point wamp at them instead. http://www.webdesign.org/web-programming/php/configure-a-virtual-directory-using-wamp.16605.html Quote Link to comment Share on other sites More sharing options...
kraxzy Posted February 8, 2011 Report Share Posted February 8, 2011 Haha kids these days .. how did you install PHP on apache back in the days if not by adding a Addtype and linking to the php engine? Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted February 8, 2011 Author Report Share Posted February 8, 2011 Haha kids these days .. how did you install PHP on apache back in the days if not by adding a Addtype and linking to the php engine? I never did. I just ignored that my PHP didn't show up. Quote Link to comment Share on other sites More sharing options...
newseed Posted February 8, 2011 Report Share Posted February 8, 2011 Nice find Eric. I haven't used WAMP in a few years but I may install it on my W7 machine and give those solutions a whirl. Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted February 13, 2011 Author Report Share Posted February 13, 2011 Here is the tut I just did for it so I know how to do it again a year from now. http://www.visibilityinherit.com/code/php-in-html-in-wamp.php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.