MOD_REWRITE and Windows IIS
Taomyn
![]()
Joined: 2003-11-11
Posts: 135 |
![]() |
Ok, hands up all those that thought I was going ask how to get MOD_REWRITE to work under Windows with IIS? Well, I'm not, but I am going to say that I've more or less got it working on my server. Just need to test a bit more before I reveal all ;) BTW. This needs additional software on the server so it won't be availble anyone that doesn't have full access to the server, or can't easily get things installed for them The only minor thing that spoils it for normal browsing of the gallery is that the link for "Gallery:" in the gallery gets set to "http://gallery.mydomain.com/albums.php" and it would be neater for it to be just "http://gallery.mydomain.com". Any chance someone could document what each of the 4 mod_rewrite rules are supposed to achieve, with an example so I can test my setup against it? Taomyn |
|
Taomyn
![]()
Joined: 2003-11-11
Posts: 135 |
![]() |
If anyone wants to know how to set this up let me know here and I'll post the information. |
|
h0bbel
![]()
Joined: 2002-07-28
Posts: 13451 |
![]() |
Taomyn, if you'd like, please add a note to the IIS documentation ( http://gallery.sf.net/docs.php ) about this. |
|
Taomyn
![]()
Joined: 2003-11-11
Posts: 135 |
![]() |
h0bbel, done as requested. :D Any questions, please feel free to ask here, Taomyn. |
|
h0bbel
![]()
Joined: 2002-07-28
Posts: 13451 |
![]() |
Taomyn, pure greatness. |
|
u8915055
Joined: 2004-08-10
Posts: 4 |
![]() |
Hello, I think I followed the instructions properly on how to get mod-rewrite and IIS working.. but how do I know its actually working? |
|
h0bbel
![]()
Joined: 2002-07-28
Posts: 13451 |
![]() |
u8915055, what does your URLs look like? |
|
Taomyn
![]()
Joined: 2003-11-11
Posts: 135 |
![]() |
Check the HTTPD.INI.ERRORS file in the same directory as the ISAPI_Rewrite programs. It will always change its date/time stamp wheneven IIS runs it (with IIS-6 you need to have called your website at least once as it doesn't load the DLL until it's needed). It will be 0k if all is well or larger and contain any error codes. BTW. What version of IIS are you using? |
|
zman
![]()
Joined: 2003-07-24
Posts: 196 |
![]() |
Hello! Just wondering if this is still the best/only way to get short URLs on a IIS machine? I have a very modified Gallery that I built on a Apache machine and I'm moving it to a IIS machine so getting these short URLs to work is important for me :D Also, I will have multiple Gallery installs on the same url. For example, I'll have Gallery installed in both locations... www.somewhere.com/gallery Will the Lite version allow me to have short URLs for both Gallery installs? How about if, on the same server, I have a URL pointing to a deeper folder? For example... www.somewhere.com/www/mysite.com/gallery has a URL which is also... Just wondering if the Lite version will work for that too? Thanks very much for any info! BTW, I do have Gallery 1.4.4-pl2 installed and running good on a Windows 2000 machine using IIS. There was some talk about people having trouble with this but it seems to work pretty good so far... with the exception of getting the short URLs to work! |
|
Taomyn
![]()
Joined: 2003-11-11
Posts: 135 |
![]() |
I can't see there being any problems with multiple, though I suspect you may have to have separate sets of entries for each gallery. However, I'm not sure I would necessarily set them up in the same way, and would prefer using separate sites for each. For example, where you have: www.somewhere.com/gallery I would set up gallery.somewhere.com This keeps them totally separate. (note each would site would point to the same place as yours so both links would work, but mine allows for simpler rules I think) If you do have more difficulties, visit the ISAPI_REWRITE forums and hunt out my thread where they kindly wrote the original settings for me. Add what you want to achieve and they can hopefully sort you out. |
|
zman
![]()
Joined: 2003-07-24
Posts: 196 |
![]() |
For some reason, I could not get what you listed in the installation documentation to work. Even with just a single Gallery install??? However, with some help from the excellent ISAPI_Rewrite team, we did get it to work! Here is what I ended up with... RewriteCond Host: www\.mysite\.com RewriteCond Host: www\.mysite\.com RewriteCond Host: www\.mysite\.com RewriteCond Host: www\.mysite\.com The above works assuming your Gallery is installed at www.mysite.com/gallery The rules above are very close to what you originally had posted but a little different. The ISAPI_Rewrite Team also said the above would work for me for doing the multiple Gallery installs using the same URL but in different folders. I'd just have to modify the rule directory stucture a little. WOOHOO! Thanks very much for getting this going and pointing me in the right direction. This has saved me a TON of time in not having to rewrite a bunch of code to make my modified gallery work with long URLs!!! |
|
dollie
Joined: 2009-07-03
Posts: 1 |
![]() |
Hi guys, I am not getting how to do mod_rewrite in IIS server. Can anyone please help me out Thanks |
|