CodeIgniter Forums
[SOLVED] htaccess subdomain - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: [SOLVED] htaccess subdomain (/showthread.php?tid=18877)

Pages: 1 2


[SOLVED] htaccess subdomain - El Forum - 05-21-2009

[eluser]yannyannyann[/eluser]
Hi,

I have a htaccess problem.

Everything worked fine on my local machine.
But since I've moved the files online, I have "404 NOT FOUND ERROR".

My URL
Code:
http://subdomain.domain.org:8081/my-page


My htaccess (placed on the root of http://subdomain.domain.org:8081/)
Code:
php_value memory_limit 64M

RewriteEngine on

RewriteCond $1 !^(index\.php|public|robots\.txt|favicon\.ico)
RewriteRule ^(.*)$ index.php/$1 [L]


Could this subdomain or port address have any influence ?


[SOLVED] htaccess subdomain - El Forum - 05-21-2009

[eluser]yannyannyann[/eluser]
To mention that it works if I do :

Code:
http://subdomain.domain.org:8081/index.php/my-page


But I'd like to get rid of index.php, like it works on my local machine.


[SOLVED] htaccess subdomain - El Forum - 05-21-2009

[eluser]Evil Wizard[/eluser]
try this subtle change

Code:
php_value memory_limit 64M

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !^(index\.php|public|robots\.txt|favicon\.ico) [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]

Hope that helps


[SOLVED] htaccess subdomain - El Forum - 05-21-2009

[eluser]yannyannyann[/eluser]
hi thanks.. but no that doesnt work.


[SOLVED] htaccess subdomain - El Forum - 05-21-2009

[eluser]Daniel Moore[/eluser]
I have a "how to remove index.php using .htaccess tutorial" set up that may be of help to you. Check it out.

It could be several different things that are wrong, so instead of telling you to check one thing, it not work, then check another, etc., the tutorial should help you with all of it. It's basically a heavily documented .htaccess file with other instructions as well.

You may also need to tweak your CI configuration settings, which is also included on that page.

http://www.danielwmoore.com/remove_index_from_codeigniter


[SOLVED] htaccess subdomain - El Forum - 05-21-2009

[eluser]Evil Wizard[/eluser]
Sorry to hear that, but I've just been to your site and had a look round,
Code:
http://cubic.ctae.org:8081/index.php/highlights
redirects to
Code:
http://cubic.ctae.org:8081/highlights/pages/1
but that page gets a 404, and I see why you are using the 8081 port as there is an MS IIS server running on 80
Code:
RewriteCond %{REQUEST_FILENAME} !([index\.php|public|robots\.txt|favicon\.ico]) [NC]
try that, I removed the "^" which means start of the string and enclosed the filename options in []


[SOLVED] htaccess subdomain - El Forum - 05-21-2009

[eluser]yannyannyann[/eluser]
For the highlights redirect, this doesn't matter, it is working well.

For the port numbern, well this is just a test server the client provided me.


[SOLVED] htaccess subdomain - El Forum - 05-21-2009

[eluser]yannyannyann[/eluser]
Thanks for the help, I appreciate.
But still doesn't work. hmmm.


[SOLVED] htaccess subdomain - El Forum - 05-21-2009

[eluser]yannyannyann[/eluser]
I have this in my coinfig file :
Code:
$config['index_page'] = "";



[SOLVED] htaccess subdomain - El Forum - 05-21-2009

[eluser]yannyannyann[/eluser]
How can I test if my .htaccess file is actually read by my system ?