Welcome Guest, Not a member yet? Register   Sign In
HTTP/HTTPS and index.php
#1

[eluser]baazil1[/eluser]
Yes, I am referencing this post: http://ellislab.com/forums/viewthread/86113/

However, it is old and quite frankly, posting this to 6 other forums and getting ZERO response has drained me, so in my last attempt, this being the only forum that has any business answering it, I shall try again.

Here is my .htaccess file:
Code:
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /

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

    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301]
</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule>

Remove the last two rules and everything works like a peach. Exactly as CodeIgniter said it would, using the URL Rewrite to remove index.php making retarded looking URLs (domain.org/index.php/section/whatever) look like normal, friendly, SEO friendly URLs (domain.org/section/whatever).

However, toss in the rules to force https, forcing my base_url to come out as https://domain.org, and everything is donked. Every sub page or section I go to that is NOT the base url (https://domain.org) is an error, file not found. Example:

Code:
https://intranet.domain.org/ works
https://intranet.domain.org/index.php/test works
https://intranet.domain.org/test FAILS

The error log is:
Code:
File does not exist: C:/Webserver/htdocs/intranet/test, referer: https://intranet.domain.org/

I cannot think of anything else in my config file or index.php page or .htaccess file that could be wrong here... when I call a subpage in the navigation view, my url is coded as:
Code:
<a href="&lt;?php echo base_url()?&gt;test"><span>test</span></a>

What gives? How am I the only one with this issue and across 6 forums, not a single answer... not even from the CodeIgniter forum!?!?

Can anyone help me out here?
#2

[eluser]Unknown[/eluser]
Did you ever find an answer to this? I am experiencing the same problem and have not been able to figure it out.




Theme © iAndrew 2016 - Forum software by © MyBB