Welcome Guest, Not a member yet? Register   Sign In
.htaccess Code from User Guide not Working
#1

[eluser]Unknown[/eluser]
Good evening,

I am just starting out with CodeIgniter and plan to develop a pretty extensive website. I am following the user guide but I am already facing a problem. I created a basic site controller just to make sure everything was set up correctly. It did. I could access it with localhost:8888/MySite/index.php/site.

Although it worked perfectly, I didn't like the URL's structure and decided to check out the user guide for removing the index.php part of the URL. Lucky me, the code snippet was right there, ready to be used. Smile

I copied it to my .htaccess file :

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

Now when I go to http://localhost:8888/MySite/site I get this message :

Quote:Not Found

The requested URL /index.php/site/ was not found on this server.

How can I fix this?

Thank you very much for your help.
#2

[eluser]KarlBallard[/eluser]
When I develop on my localhost, I get the exact same so I just edit my .htaccess with one extra part.

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /FOLDER_NAME/index.php/$1 [L]


Make sure you edit the FOLDER_NAME. Wink
#3

[eluser]Unknown[/eluser]
Thanks for your answer. But I am sadly stille getting the same error message. Sad




Theme © iAndrew 2016 - Forum software by © MyBB