Welcome Guest, Not a member yet? Register   Sign In
.htaccess is not working on my server
#1

[eluser]sridhar2do[/eluser]
.htaccess is not working on my server i have did hole coding part but now without the index.php its not working please help me out. Its Unix server.

Try 1
Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]

http://www.testpage.com/test/index.php/pages/
It works fine

http://www.testpage.com/test/pages/
404 Page Not Found [from codeigniter 404 error]

Try 2
Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

http://www.testpage.com/test/pages/

Code:
404: Page not found
This error is generated when there was no web page with the name you specified at the web site.

Troubleshooting suggestions:

Ensure the page you are linking to exists in the correct folder.

Check your file name for case sensitivity . Index.htm is not the same as index.htm!

Temporarily disable any rewrite rules by renaming your .htaccess file if it exists.

Try 3
Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]

http://www.testpage.com/test/pages/

No input file specified.
#2

[eluser]sridhar2do[/eluser]
Hey guys find the solution

Code:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/system.*
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

if your codeigniter is in some subfolder please use as mentioned below

Code:
RewriteBase /subfolder/
#3

[eluser]CroNiX[/eluser]
It should work without these 2 lines:
Code:
RewriteCond %{REQUEST_URI} ^/system.*
RewriteRule ^(.*)$ index.php?/$1 [L]

The system dir now has it's own htaccess which prevents access.




Theme © iAndrew 2016 - Forum software by © MyBB