htaccess problem, rewrite to stats folder - 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 problem, rewrite to stats folder (/showthread.php?tid=3645) |
htaccess problem, rewrite to stats folder - El Forum - 10-15-2007 [eluser]Référencement Google[/eluser] Hi, I've get a problem, cannot find a solution since I am not very good with htaccess and regular expressions. I have a stats folder on www.mysite.com/awstats/ and the problem is that codeigniter "think" it is a controller. So here is my .htaccess actually: Code: <IfModule mod_rewrite.c> Any help please? htaccess problem, rewrite to stats folder - El Forum - 10-15-2007 [eluser]Crafter[/eluser] Your rewrite rule for the awstats is not neccessary because of the two lines above that rule. htaccess problem, rewrite to stats folder - El Forum - 10-15-2007 [eluser]Référencement Google[/eluser] Yes, but it isn't working, this is why I am posting, trying to get some help to make that work while I am typing www.mysite.com/awstats I need that the stats folder is displayed, and this stats tools is not part of CI. htaccess problem, rewrite to stats folder - El Forum - 10-15-2007 [eluser]Crafter[/eluser] So I take it your site is organised something like this .htaccess ~~ your apache config override index.php ~~ CI index file => system ~~ CI system dir => awstats ~~ non-CI dir => images ~~ example dir Then just the RewriteCond should be sufficient. What happens if you type: - www.mysite.com/awstats - www.mysite.com/somevalidontroller - www.mysite.com/junkcontroller htaccess problem, rewrite to stats folder - El Forum - 10-15-2007 [eluser]Référencement Google[/eluser] Yes it is exactly organized how you said. Now typing this: - www.mysite.com/awstats ===> CI 404 error - www.mysite.com/somevalidontroller ===> OK - www.mysite.com/junkcontroller ===> CI 404 error htaccess problem, rewrite to stats folder - El Forum - 10-15-2007 [eluser]Crafter[/eluser] OK. I was trying to detriine if your htaccess was bwing processed at all. www.mysite.com/somevalidontroller ===> OK tells me it is. I've tried this, with and without the awststats RewriteCond line, and it works. I can't think of what else may be preventing this form working. BTW, perhaps state your OS. I know there has been some problems on XP where solutions have been tendered. Alternatively, you could try using the apache alias tag Alias /awstats "/var/www/default/awstats" htaccess problem, rewrite to stats folder - El Forum - 10-15-2007 [eluser]Référencement Google[/eluser] Finally got it while trying and trying: Code: <IfModule mod_rewrite.c> It is actually working like I want, but if you see something wrong in it, please say! Thanks for the help Codecrafter htaccess problem, rewrite to stats folder - El Forum - 10-15-2007 [eluser]Référencement Google[/eluser] No I was wrong, my post below does not work... Also the server is a Linux server. Trying this line Alias /awstats "/domains/site.com/public_html/awstats" Give me an error 500 Any other idea? htaccess problem, rewrite to stats folder - El Forum - 10-15-2007 [eluser]Référencement Google[/eluser] Just remembered I had a My_router function that can make this problem: Code: class MY_Router extends CI_Router The problem is that I am not understanding enough things to find and solve the problem. |