Welcome Guest, Not a member yet? Register   Sign In
Problem hosting local version of working sites.
#1

[eluser]BentMC[/eluser]
I am fairly new to CI and I just started at a company a few months ago that use it for their sites. I am in the process of setting up a webserver to work on locally so that all our testing is not done on live sites. I have set up XAMPP and I have all of my files moved locally but when I try to access them they redirect me to http://www.localhost.

I have looked through the htaccess file and in a million different places trying to track down where this redirect may be happening but in my 2 weeks on it I have come up with nothing. Any suggestions?
#2

[eluser]danmontgomery[/eluser]
Do you mean that you're being redirected to http://www.localhost/some/page instead of http://localhost/some/page, before you take any action other than loading the page?

Post your htaccess?
#3

[eluser]BentMC[/eluser]
Code:
Options -Indexes

RewriteEngine on

RewriteCond %{HTTP_HOST} !^(www\.) [NC]
RewriteCond %{HTTP_HOST} !(example.com) [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [L,R=301]

RewriteRule ^landhub(/.*)?$ /strawfire$1 [L]
RewriteRule ^strawfire(/.*)?$ /index.php/core/backend/index$1 [L]
RewriteRule ^pub/(.*)$ /rescompiler.php/$1 [L]
RewriteRule ^system/(.*)$ /rescompiler.php/$1 [L]

RewriteCond $1 !^(index\.php|rescompiler\.php|userfiles|application|robots\.txt|sitemap\.xml)
RewriteRule ^(.*)$ /index.php/core/front/index/$1 [L]

It seems that even when I remove the htaccess file it still does this. I'm not entirely sure how the person set it all up and he is not responding to my phone calls.
#4

[eluser]BentMC[/eluser]
And I have a virtual host set up where (for example) p.localhost would link to this directory and it would then change it to www.p.localhost
#5

[eluser]danmontgomery[/eluser]
Code:
RewriteCond %{HTTP_HOST} !^(www\.) [NC]

is redirecting any non www. requests to www.
#6

[eluser]BentMC[/eluser]
I take it out and it still does the redirect though, I've tried removing the htaccess completely.




Theme © iAndrew 2016 - Forum software by © MyBB