htaccess problem, rewrite to stats folder |
[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?
[eluser]Crafter[/eluser]
Your rewrite rule for the awstats is not neccessary because of the two lines above that rule.
[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.
[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
[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
[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"
[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
[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?
[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. |
Welcome Guest, Not a member yet? Register Sign In |