problem with RewriteRule in .htaccess |
[eluser]technovicebd[/eluser]
I have 2 issues with .htaccess in my server & even in my loacalhost(I am using xampp) 1. I always faced this issue: User guide has this .htaccess info: RewriteEngine On RewriteCond $1 !^(index\.php|question/assets|images_dir|pdf_dir|robots\.txt) RewriteRule ^(.*)$ /index.php/$1 [L] And my application in a folder say (C:/proramfiles/xampp/htdocs/question/question/) I separated the application folder & kept it in out of system folder & renamed as question. Then when i tried to browse as http://localhost/question/ it took me to http://localhost/xampp/ But as soon as I change the RewriteRule like this: RewriteRule ^(.*)$ ./index.php/$1 [L] -- I just added a (.) before /index.php it works fine. Then where is the problem ?? with my server or with CI help for rewriting, please tell me. 2. This is the second issue which is most ridiculous: I am using this .htaccess rules: RewriteEngine On RewriteCond $1 !^(index\.php|question/assets|images_dir|pdf_dir|robots\.txt) RewriteRule ^(.*)$ ./index.php/$1 [L] AND when I browsed my site like this: http://localhost/question/ and login there it take me to the next link http://localhost/question/login/login_next in a good fashion.But I uploaded the file in mysite: www.sajjadul.com and you can check it there too: http://sajjadul.com/project/php/question Login as student1/1234 it will not go to the next page as http://sajjadul.com/project/php/question...login_next (this link does not work there in my site). That's why I added extra (indx.php)& then the link works fine with this URL http://sajjadul.com/project/php/question...login_next. Will anyone can tell me how to remove that index.php from the URL or why my RewriteRule is not working ![]()
[eluser]Daniel Moore[/eluser]
Take a look at http://www.danielwmoore.com/remove_index...niter.html That should help you figure it out.
[eluser]technovicebd[/eluser]
That's an awesome post. My all problem solved. |
Welcome Guest, Not a member yet? Register Sign In |