Jump to content

Will WAMP local testing work with .html ext with .htaccess enabled includes?


PicnicTutorials

Recommended Posts

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 by Eric
Link to comment
Share on other sites

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.conf

A 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 by Eddie
Link to comment
Share on other sites

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 by Eric
Link to comment
Share on other sites

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 by Eric
Link to comment
Share on other sites

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 by Eric
Link to comment
Share on other sites

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 by Eric
Link to comment
Share on other sites

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 by Eric
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...