Welcome Guest, Not a member yet? Register   Sign In
Local site not loading in WAMP, instead it loads WAMP Index Page without images
#1

[eluser]Unknown[/eluser]
Hi, been dealing with this issue for a couple days now, looking at the forums gleaning information, trying different things and here is what I know. I still cannot see my CodeIgniter site in WAMP and it instead loads the wamp index page without images.

I only have this problem with my Ci site as all my others in WAMP work fine.

Here is what I have tried,

I edited the .htaccess and put the rewrite base to my folder name:

Code:
RewriteEngine on
RewriteBase /sunrisemediapartners_reach/

AddDefaultCharset UTF-8

RewriteCond $1 !^(index\.php|assets|css|js|images|img|robots\.txt|favicon\.ico)
RewriteRule ^(.*)$ /index.php/$1 [L]

I edited my base_url in config so that it is:

Code:
$config['base_url'] = 'http://localhost/sunrisemediapartners_reach/';

I have left index blank in my config file as well.

I have also set up an alias in Apache so that I would redirect the folder to a simpler name and none of that is working. I don't know what else to do or try.

The only way I can see a page is with this: http://localhost/reach/index.php/index

But that only shows HTML and none of the links inside of that work cause each page only views the WAMP index page without images.

I need help and thoughts are appreciated!

PS - This is a project I am working with someone collaboratively on so we are both editing locally and committing revisions just for some detailed info.

Thanks!
#2

[eluser]TheFuzzy0ne[/eluser]
If you rename your .htaccess file, does your Web site still load? I'm assuming that your Web site was working fine up until you created your .htaccess file? I just want to confirm that you have your V-host set up correctly.

Ideally, you should add an entry to your Windows hosts file, for example:
Code:
127.0.0.1    mysite.localhost

Then, if you've setup your vhost entry correctly, you should be able to access your Web site at http://mysite.localhost. I find that this can help with these kinds of problems.

If you're certain that everything is setup correctly, and it's definitely the .htaccess file that's the problem, please try this .htaccess file:
Code:
<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{REQUEST_URI} ^/(system|application)
    RewriteRule ^(.*)$ /index.php?/$1 [L]

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

Alternatively, you may want to consider virtualisation. It can be a pain in the posterior to get setup, but it brings with it many advantages, such as the ability to distribute your server environment to other developers, so you can all work with the exact same setup, which can mimic the production server as much as possible.

Apache 2 on Windows seems to parse the .htaccess file differently, so you may find that something breaks when you upload your app, if your production server is running Linux. Virtualisation can protect you from these types of problems.
#3

[eluser]pickupman[/eluser]
How removing the leading slash for index.php
Code:
RewriteEngine on
RewriteBase /sunrisemediapartners_reach/

AddDefaultCharset UTF-8

RewriteCond $1 !^(index\.php|assets|css|js|images|img|robots\.txt|favicon\.ico)
RewriteRule ^(.*)$ index.php/$1 [L]




Theme © iAndrew 2016 - Forum software by © MyBB