• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[solved]Url issues

#1
[eluser]Broussai[/eluser]
Hi,
I've got problems :
WHen i rewrite url : error 404 from the server when trying to anchor with the code below;
when i don't rewrite url and if i anchor to /article like :
Code:
<?php  echo  anchor('/article', 'My News'); ?>
The home.php file (it's my index) is loaded.

My config.php
Code:
$config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http");
$config['base_url'] .= "://".$_SERVER['HTTP_HOST'];
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
$config['index_page'] = "index.php";
/*when ht access off, else "". I've tried "?" and "index.php?"
doesn't change anything */*
$config['uri_protocol']    = "QUERY_STRING";
My .ht access (when off):
Code:
Options FollowSymLinks

<IfModule mod_rewrite.c>
   RewriteEngine off
    RewriteCond $1 !^(index\.php|assets|user_guide|robots\.txt)
      RewriteRule ^(.*)$ /V1/index.php/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 V1/index.php
</IfModule>
The httpd.conf has been conf to accept mod_rewrite.c

My article.php class :
Code:
&lt;?php
class article extends Controller {
    function article()
    {
         parent::Controller();    
    }
        
    function index()
    {
        $this->load->view('V1/articles_view');
      
   }
   function bla(){
        echo 'lol';
   }
    
}
//"?&gt;" or not doesn't change anything
articles_view.php
Code:
hello world   !

#2
[eluser]Broussai[/eluser]
ok, i've made a new install without htaccess; all run.

sry for the useless post..


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.