Welcome Guest, Not a member yet? Register   Sign In
I want to remove /index.php/
#11

[eluser]Blazeme[/eluser]
Set error_reporting(E_ALL). I think .htaccess is ok, at least, it works for me (both on linux and windows).
I think you have error in your PHP code.
Try something like this:
Code:
<?php
class Site extends Controller {
      public function index() {
// I think helper goes before view.
        $this->load->helper("url");
        $this->load->view("site_view");
        echo anchor("site/register","Register");
      }
      public function register() {
        echo "Register section";
        $this->load->view("site_view");
      }
  }
?>
Also, please use [ code ] tags, it's easier to see code.
#12

[eluser]bastones[/eluser]
No errors came up. I think its a problem with my webhost, have contacted them. Any suggestions in meanwhile appreciated Smile.
#13

[eluser]Blazeme[/eluser]
Well, probably, it's host's problem. Tell us what happened when u find out.
Also, try on localhost?
#14

[eluser]lmv4321[/eluser]
[quote author="bastones" date="1225912460"]The system folder is in root directory Smile. Controller code:
Code:
<?php

    class Site extends Controller {
        public function index() {
            $this->load->view('site_view');
            $this->load->helper('url');
            echo anchor('site/register','Register');
        }
        public function register() {
            $this->load->view('site_view');
            echo "Register section"
        }
    }
?>
[/quote]
Try changing the line
Code:
echo anchor('site/register','Register');
to this
Code:
$this->register();
or try this
Code:
redirect('site/register','Register');
#15

[eluser]bastones[/eluser]
THANK GOD. Got it working with a config modification:

$config['uri_protocol'] = "REQUEST_URI";
#16

[eluser]ray73864[/eluser]
you shouldn't have to set 'uri_protocol' to that, at least i didn't with my one, which could point towards a faulty .htaccess setup
#17

[eluser]alejandra[/eluser]
[quote author="Blazeme" date="1225910549"]Try this code:
Code:
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>
<IfModule mod_security.c>
   SecFilterEngine Off
   SecFilterScanPOST Off
</IfModule>
Put it in public_html (root).
URL to your .htaccess:
http://www.yoursite.com/.htaccess

I think this should do the trick, if not, we'll think of something else Smile[/quote]

I'm trying to remove the index.php from my app and this did the trick for part of the site but when it transfer to the ssl it start losing links, I'm guessing is because of the RewriteBase should be different but I don't know how to work this. Maybe a condition if the port is different do a different RewriteBase.

Can some one help me?
#18

[eluser]Phil Sturgeon[/eluser]
You will need to tel apache to do the following. Not sure if you can sneak that line into a .htaccess or wether it needs to be in httpd.conf.

Quote:Listen 443
#19

[eluser]alejandra[/eluser]
Thanks I'm going to try it Smile




Theme © iAndrew 2016 - Forum software by © MyBB