Welcome Guest, Not a member yet? Register   Sign In
Links don't work in local copy of CI
#1

[eluser]JenR-o-Jenny[/eluser]
Newbie here and stumped. I can't seem to get the local development copy of my site to work properly. When I click on a link, I get a 404 not found.

I am using WAMPSERVER and I know I am connected to my db since i get the index page and all the links. I've modified the config.php file for the local info. I've tried each of the options for URI Routing to no avail.

I've ensured that the Apache rewrite module is enable and upon reviewing the apache error log i get:
[Fri Apr 03 08:41:36 2009] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/ScenicDVL/products

If I add index.php to my url i then get the page, however mod_rewrite is enable.

HELP! Also, recommendations on XAMPP over WAMPSERVER?

Thanks in advance!
#2

[eluser]TheFuzzy0ne[/eluser]
I use XAMPP, and used it back in the days when it was WAMPP. Never used WAMPSERVER. I'd suggest you try using XAMPP server also, unless you have a specific reason for installing WAMPSERVER.
#3

[eluser]JenR-o-Jenny[/eluser]
Thank you :cheese:

I tried installing XAMPP and it seems way above my head at this point, so I am going to continue with WAMPSERVER. Any suggestions on my problem -- I've read similar posts and none of them seemed to be resolved. something to do with the mod_rewrite function ... i am assuming.
#4

[eluser]JenR-o-Jenny[/eluser]
After a full day of google and CI thread searches, here's where I am at with still no progress.

Sure it has something to do with mod_rewrite function since my url's work if I manually add back in /index.php/.

For example, clicking a link gives me URL:
http://localhost/ScenicDVL/products/jungle-food

which results in a 404:
Not Found

The requested URL /ScenicDVL/products/jungle-food was not found on this server.

If I change the URL to:
http://localhost/ScenicDVL/index.php/pro...ungle-food

the page populates. doh!

I am running WAMPSERVER, APACHE 2.2.3

My current htaccess file reads:
Code:
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

# if URL starts with /TinyMCE, stop processing here
RewriteCond %{REQUEST_URI} ^/tinymce [NC]
RewriteRule .* - [L]x

I've added the following to the httpd.conf file (based on CI threads and other searches):

Code:
<IfModule mod_rewrite.so>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^(/index\.php|/img|/js|/css|/robots\.txt|/favicon\.ico)
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>

<Directory "c:/wamp/www/ScenicDVL/">
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride AuthConfig FileInfo
Order allow,deny
Allow from all
</Directory>

I've updated config base url's to include the /index.php/ and that doesn't even seem to register.

Verified both in httpd.conf and phpinfo() that rewrite_mod is enabled in Apache.

I am a total newbie but think I've done my best trying to figure this thing out.

HELP PLEASE! I will be forever indebted :exclaim:
#5

[eluser]TheFuzzy0ne[/eluser]
In the config.php file, try each of those protocols out, and see if that makes any difference.

Also, sometimes the rewrite just needs tweaking. I'd try some of the following combinations:

Code:
<IfModule mod_rewrite.so>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^(/index\.php|/img|/js|/css|/robots\.txt|/favicon\.ico)
RewriteRule ^(.*)$ /index.php?/$1 [L]
</IfModule>

Code:
<IfModule mod_rewrite.so>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^(/index\.php|/img|/js|/css|/robots\.txt|/favicon\.ico)
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

Code:
<IfModule mod_rewrite.so>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^(/index\.php|/img|/js|/css|/robots\.txt|/favicon\.ico)
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

Or perhaps better yet, go with this one - http://codeigniter.com/wiki/mod_rewrite/




Theme © iAndrew 2016 - Forum software by © MyBB