I'm trying to compile mod_rewrite to a dll file.
The problem is when I compile the mod_rewrite.dsp in VisualStudio 6 or use the 'nmake' command to compile mod_rewrite.mak in DOS-mode I only get a mod_rewrite.so, I don't get a mod_rewrite.dll!?
So, what have I done wrong?
I need the dll to make the mod_rewrite to work in my Apache.
My Apache resides on my Win 2000 computer.
Pls, I need help...
/Grodan :)
Welcome to WmW.
I've never compiled Apache for windows - but the so (shared object) file your seeing is the equivalent to a dll for Unix.
I guess you need to search the source code for ".so" and switch to dll. (sorry not too much help here).
On a side note - when I downloaded apache for NT it had all the mod_rewrite functionality already included .... might this not be an easier option?
Gethan
Yepp, I did know that. But the problem is that I suck on C. I don't know where to change all the lines. Does anyone know this?
Yes that would be an easier option :)
From where did you download that version?
But I still want to now what I should do to make a dll-file.
/grodan
I've downloaded a copy of Apache yesterday. When I search for dll:s I don't find that one.
Have I dowloaded the wrong file then?
Can you maybe provide a URL?
/Grodan
[httpd.apache.org...] - compiling apache for windows.. erm looks fun. Good luck - let us know what you had to do to get it all going.
No sign of any other dlls?
When I read the documentations for adding new modules runtime, in *nix you have the.so-files but in windows you need .dll, just like when you install PHP.
The only way to get the .dlls is to compile the modules that I want.
I have tried to do this but I only get an .so-file.
/Grodan
#LoadModule rewrite_module modules/mod_rewrite.so
in the http.conf file?
also, remember to take the comment off the next bit as well
#AddModule mod_rewrite.c
I didn't think windows needs a .dll file to run a module though, I run module_ntlm modules/ntlm_module.so and it works fine for authentication on an NT box.
When i took away the '#' i didn't. :)
I have then created a '.htaccess'-file and in this written:
RewriteEngine on
RewriteRule !\.(gif¦jpg¦png¦css)$ /index.html
When I directly access a image it works, I can see the image. But when I'm trying to access any other file, nothin seems to happen... have I cerated the deadly loop that I have read about?
Maybe the path to 'index.html' is wrong?
I have installed the apache server in the path 'C:\Program Files\Apache Group\Apache\htdocs', I have put the '.htaccess'-file in the 'htdocs' -folder. In this folder I also keep the 'index.html'. Have I written the wrong path in the '.htaccess' -file?
Sorry for the beginner questions...
Hoping for more help
/Grodan :)
Darn - I wish I'd thought of that ;)
==
RewriteEngine on
RewriteRule !\.(gif¦jpg¦png¦css)$ /index.html
If the .htaccess file above is in your root directory then yep - you've made a condition that can never allow index.html to be viewed. It's the loop as you mention - after mod_rewrite has established that you don't want a .gif etc, it then reruns the rules for index.html and so on and on.
Try this snippet:
RewriteEngine on
RewriteRule index.html$ - [L]
RewriteRule !\.(jpg¦gif¦css)$ /index.html [L]
Also see - for loads more mod_rewrite fun..
[engelschall.com...]
(from the guy that wrote it).
[added] Make sure you replace the ¦'s and type them from your keyboard[/added]
Thx a bunch!
I don't really know whats the different is from your code and 'my' code.
But I will look further at Engelschall's website.
Again, you have saved my day. :D
/Grodan