![]() |
.htaccess on wamp instead lamp - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: .htaccess on wamp instead lamp (/showthread.php?tid=20424) Pages:
1
2
|
.htaccess on wamp instead lamp - El Forum - 07-09-2009 [eluser]mradlmaier[/eluser] I have a Codeigniter Project, which runs flawlessly on an openSuse 11.1 (also 11.0) Linux box, where I use to do development. Now I have to setup that very same project on a wamp server, ;-( I expected this to be a matter of copying over the files as these are both apache server. Unfortunately it does not work that way. I receive a 404 error when accessing on the wamp server. My CI app is in: C:/privat-chat-kontaktanzeigen/ That´s part of my httpd.conf on wamp: Code: LoadModule rewrite_module modules/mod_rewrite.so And that´s my .htaccess in C:/privat-chat-kontaktanzeigen/ Code: RewriteEngine On Do I miss something? It has been a while, since I last time i did configuration of apache and ci. As I said, on 3 different Linux boxes, this works (with the unix pathes obviously). Does anybody have an idea? BTW, access to http://127.0.0.1/privat-chat-kontaktanzeigen/user_guide/ works on wamp, just not to http://127.0.0.1/privat-chat-kontaktanzeigen/ Thanks, Michael .htaccess on wamp instead lamp - El Forum - 07-09-2009 [eluser]TheFuzzy0ne[/eluser] I'd suggest changing these lines: Code: RewriteRule ^(.*)$ /index.php/$1 [L] To this: Code: RewriteRule (.*) index.php?/$1 [L] And seeing if that makes any difference. .htaccess on wamp instead lamp - El Forum - 07-09-2009 [eluser]TheFuzzy0ne[/eluser] Oh, and one more thing - You appear to have a mixture of two different htaccess files. I'd also suggest losing the rewrite base, as it shouldn't be needed. So, this is what I think should work for you: Code: RewriteEngine On .htaccess on wamp instead lamp - El Forum - 07-09-2009 [eluser]mradlmaier[/eluser] Hello TheFuzzyOne, Thanks for the quick reply. Unfortunately both your suggestions don´t work. I am really annoyed about this apache configuration stuff, because I don´t have a good idea how to debug it. Would like to get back to coding with CI quickly... How do you go about debugging/figuring out what´s wrong? Do I miss someting else? It should only be: 1. enable mod_rewrite, that´s Code: LoadModule rewrite_module modules/mod_rewrite.so Code: <Directory /> As far as I remember, that should be all? Best regards, Michael .htaccess on wamp instead lamp - El Forum - 07-09-2009 [eluser]TheFuzzy0ne[/eluser] Apparently you need to enable mod_rewrite for WAMP - http://ellislab.com/forums/viewreply/607036/ .htaccess on wamp instead lamp - El Forum - 07-09-2009 [eluser]mradlmaier[/eluser] As far i can tell, I enabled mod_rewrite already, because in C:\wamp\bin\apache\Apache2.2.11\conf\httpd.conf the line Code: LoadModule rewrite_module modules/mod_rewrite.so Any wamp specialists out there? Michael .htaccess on wamp instead lamp - El Forum - 07-09-2009 [eluser]mradlmaier[/eluser] I should add that the 404 Page Not Found Page is generated by CI and not the 404 of Apache, which looks different. Michael .htaccess on wamp instead lamp - El Forum - 07-09-2009 [eluser]TheFuzzy0ne[/eluser] If it's a CodeIgniter error page and you're certain that the controller exists, and is in the right format, then it's probably the URI protocol that needs changing in your config.php. I'd suggest trying each of them. .htaccess on wamp instead lamp - El Forum - 07-10-2009 [eluser]mradlmaier[/eluser] OK, at least this causes some other effects: Here are the results: AUTO --> http://127.0.0.1/privat-chat-kontaktanzeigen/ displays index page, links are 404 by Apache, http://127.0.0.1/privat-chat-kontaktanzeigen/gast/index is 404 by Apache PATH_INFO --> http://127.0.0.1/privat-chat-kontaktanzeigen/ displays index page, links are 404 by Apache, http://127.0.0.1/privat-chat-kontaktanzeigen/gast/index is 404 by Apache QUERY_STRING --> http://127.0.0.1/privat-chat-kontaktanzeigen/ displays index page, links are 404 by Apache, http://127.0.0.1/privat-chat-kontaktanzeigen/gast/index is 404 by Apache REQUEST_URI --> http://127.0.0.1/privat-chat-kontaktanzeigen/ displays page 404 by CI, http://127.0.0.1/privat-chat-kontaktanzeigen/gast/index is 404 by Apache ORIG_PATH_INFO --> http://127.0.0.1/privat-chat-kontaktanzeigen/ displays index page, links are 404 by Apache, http://127.0.0.1/privat-chat-kontaktanzeigen/gast/index is 404 by Apache I should also add that the site is using routes (to enable search-engine-friendly dashes in method names). All this is working flawlessly under Linux. Michael .htaccess on wamp instead lamp - El Forum - 07-10-2009 [eluser]TheFuzzy0ne[/eluser] That's very strange. I guess that rules out any problems with case sensitivity, which was going to be my next suggestion. I'm totally baffled, and I hope that someone else may have an idea of what's going on. If the worst comes to the worst, would you be able to zip up your code and put it somewhere for me to download and check? |