Welcome Guest, Not a member yet? Register   Sign In
Does CI work with window based server?
#1

[eluser]seeraw[/eluser]
Hello All CI lovers,
Please help me to find out the solution.
#2

[eluser]wyred[/eluser]
It should work fine, why don't you try installing it?
When a problem occurs, then come back here with details. Smile
#3

[eluser]arbme666[/eluser]
I do dev on ubuntu and windows both running apache and I have never had a problem, apart from being stupied and forgeting "\" for windows and "/" for linux paths :lol:
#4

[eluser]seeraw[/eluser]
I had lots of google about how to remove index.php file CI's URL and get lots of solution but it's not working with me can anybody please help me below is my htaccess code along with I have set index_page to blank in config file also

Please see the below code

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

Thanks,
Swapnil
#5

[eluser]wyred[/eluser]
Firstly, are you using Apache web server?
#6

[eluser]InsiteFX[/eluser]
For one on widows there needs to be a change!

Code:
# this is wrong!
<IfModule mod_rewrite.c>

# on windows it is.
<IfModule mod_rewrite.so>

# also you may need to change this.
RewriteRule ^(.*)$ /myprojectname/index.php/$1 [L]

#to this.
RewriteRule ^(.*)$ /myprojectname/index.php?/$1 [L]

Any windows <IfModule> type shoud end with .so not .c

InsiteFX
#7

[eluser]seeraw[/eluser]
Yes wyred I am using Apache web server
#8

[eluser]Dahak-II[/eluser]
I develop locally on a Windows XP box running Apache/2.2.14 (Win32) PHP/5.2.6.

My htaccess file reads as:


Code:
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript application/javascript text/css
AddOutputFilterByType DEFLATE application/javascript

RewriteEngine on

RewriteCond $1 !^(index\.php|rss-feed\.php|robots\.txt|phpinfo\.php|favicon\.ico|apple-touch-icon\.png|index_header\.php|index_navjavaphp\.php|index_archivenavjavaphp\.php|images|css|CSS|js|tmp|_Counters|Collections)
RewriteRule ^(.*)$ /index.php?/$1 [L]

The RewriteCond line just lists all of the files/directories excluded from he rewrite.

This is the same htaccess file used in the production environment.

I have the site configured to remove the index.php from the URI, so you also need:

Code:
$config['index_page'] = "";

My code is configured to auto-detect if it's running under Windows (dev) or Linux (production) with:

Code:
if (stristr(PHP_OS, 'WIN')) {
  $config['uri_protocol'] = 'REQUEST_URI';
} else {
  $config['uri_protocol'] = 'AUTO';
}

Any other environment-specific code can be checked the same way.

For instance, I assume that if the OS is Windows, it's my local dev box and configure logging threshold and other values accordingly. If the OS is not Windows, I assume it's the production environment.

Full Disclosure:
At the moment, my old site has ported over to CI2.0 and runs on my Windows dev box fine, but only routes to the default controller/index in my production Linux environment.
#9

[eluser]seeraw[/eluser]
Thanks every one I will try and let you know my views

Swapnil




Theme © iAndrew 2016 - Forum software by © MyBB