mod_rewrite, what am i doing wrong? |
[eluser]b2000b[/eluser]
Ive been trying at this for a few hours now and I just cant get mod_rewrite to remove the index.php from my ci project. Here is what I've done. config.php Code: $config['index_page'] = ''; .htaccess Code: <IfModule mod_rewrite.c> mod_rewirte IS enabled, it it shown in: apache2handler -> Loaded Modules -> mod_rewrite, when phpinfo(); is called. uname -a: Code: Linux io.b2000b.net 2.6.32-220.2.1.el6.x86_64 #1 SMP Fri Dec 23 02:21:33 CST 2011 x86_64 x86_64 x86_64 GNU/Linux CI is located in: /var/www/html/b2k/ CI is accses as: io.b2000b.net/b2k CI can be found on the Internet at http://b2000b.net/b2k If anyone can help that be wonderful! I host this sever my self and have full root accsess to it. I can get this working fine with my VPS but I cant pinpoint what I've done wrong here.
[eluser]Stefan Hueg[/eluser]
Try this: Code: RewriteBase /b2k And also try to remove the leading slashes from your RewriteRules.
[eluser]b2000b[/eluser]
Thanks, I will try this later tonight and get back to you.
[eluser]ojcarga[/eluser]
I am just using this Code: <IfModule mod_rewrite.c> I have mi CI two level high that is why I use /folder1/folder2/index.php
[eluser]InsiteFX[/eluser]
If you are using XAMPP on windows your .htaccess file will never work! If you want to test .htaccess is working just place text in the top of it Code: // <IfModule mod_rewrite.c> needs to be changed to <IfModule mod_rewrite.so>
[eluser]ojcarga[/eluser]
@InsiteFX, it is strange cuase my .htaccess looks like this and works perfect. Code: <IfModule mod_rewrite.c> I guess I had to un-comment something inside the httpd.conf Code: LoadModule rewrite_module modules/mod_rewrite.so and as you say, on windows it uses .so instead of .c ... strange, uh?
[eluser]b2000b[/eluser]
InsiteFX, I am not useing XAMPP on windows, quoting myself; Quote:uname -a: Or, In other words, CentOS 6.2 2.6.32 64bit Ojcarga, since it is Linux I have used the .c extention, and Quote:LoadModule rewrite_module modules/mod_rewrite.cis uncommented in my httpd.conf (becuase mod_rewrite shows in phpinfo(); I can be sure of this.) I still havent been able to test the ideas to fix the problem, Ill be doing it tonight. |
Welcome Guest, Not a member yet? Register Sign In |