Welcome Guest, Not a member yet? Register   Sign In
Store form data in database and email it to email address x
#11

[eluser]rhand_ci[/eluser]
Strange. Decided to continue working on the form and so on today. Now when I try to open localhost/ci/rentalform/ or localhost/ci/rentalform.php I get an ugly 404
Code:
The requested URL /ci/rentalform was not found on this server
. Apache error log states:
Code:
[Sun Feb 28 12:47:36 2010] [error] [client ::1] File does not exist: /opt/local/apache2/htdocs/ci/rentalform/
Any ideas? Is it caused by the fact that I moved the applications folder to my CI root maybe?
#12

[eluser]rhand_ci[/eluser]
Never mind. Forgot I had to use this path: http://localhost/ci/index.php/rentalform including index.php . Will read http://ellislab.com/codeigniter/user-gui.../urls.html so I no longer need to add index.php .
#13

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

to a new .htaccess. Still http://localhost/ci/rentalform/index.php gives me a non CI error: The requested URL /index.php/rentalform/index.php was not found on this server. while http://localhost/ci/index.php/rentalform/index.php gives me a CI 404 and http://localhost/ci/index.php/rentalform/ gives me the form with broken styling.. Odd. But then I checked the pache error log and decided to use this .htaccess:
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /ci/index.php/$1 [L]

And now I can reach http://localhost/ci/rentalform/ :-)

Now I only need the stylesheet loaded with
Code:
<link href="<?=base_url()?>style.css" rel="stylesheet" type="text/css">
to work..
#14

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

Did the trick to make the style.css to load properly.
#15

[eluser]rhand_ci[/eluser]
Now I need index.php droppped in the middle of http://localhost/ci/index.php/auth/login as well
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt|style\.css|auth\/login)
RewriteRule ^(.*)$ /ci/index.php/$1 [L]

with
Code:
auth\/login
added does not help...

but this does:

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /ci/

    #Removes access to the system folder by users.
    #Additionally this will allow you to create a System.php controller,
    #previously this would not have been possible.
    #'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn't true it sends the
    #request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 /index.php
</IfModule>

Found it at Code Igniter Wiki




Theme © iAndrew 2016 - Forum software by © MyBB