• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
home controller

#11
(12-08-2014, 05:07 PM)djcata Wrote: Hello

my home controller routes do not work so if i go to www.mysite.com is ok witch (default controller is home) but if i go www.mysite.com/home/register/ i get another page witch i do not know


Please paste the content of your controller here.
Romanian CodeIgniter Team :: Translations :: Comunity :: Developers
http://www.codeigniter.com.ro
Reply

#12
ok , i will
(12-09-2014, 09:07 AM)Dracula Wrote:
(12-08-2014, 05:07 PM)djcata Wrote: Hello

my home controller routes do not work so if i go to www.mysite.com is ok witch (default controller is home) but if i go www.mysite.com/home/register/ i get another page witch i do not know


Please paste the content of your controller here.
Reply

#13
ok

this is the controller part :
PHP Code:
<?php
class home extends Controller {

    function 
__construct(){
        
parent::Controller();
        
//$this->output->enable_profiler(TRUE);
    
}

    public function 
all_newsletters(){
        
$this->load->view('all_newsletters',array(
        ));
    }
}
?>

this is .htaccess :
Code:
DirectoryIndex index.php
Options +FollowSymLinks
#redirect from site without www to www without index.php version
RewriteCond %{HTTP_HOST} ^mysite.com [NC]
RewriteRule ^(.*)$ http://www.mysite.com/$1 [L,R=301,NC]

RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

#remove index.php from url
RewriteBase /
RewriteCond $1 !^(index\.php|import|sitemap[0-9]+\.xml.gz|cgi-bin/|imageuploader|images/|css/|js/|swf/|robots\.txt|test\.php)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

after i enabled profiler in base controller class i get profiler reports for all controller but the view that should be at www.mysite.com/home/all_newsletter does not work , shows another thing and does not show profiler information
and i have some problems with url , as they are appending like this :
/FAQ/billing_questions/contact_us/terms_of_use/provider/edit/

so i go first to /FAQ/billing_questions and after that if i go to contact_us it gets appended and like this if i go to terms_of_use and provider/edit/ even if profiler show the controller/method as FAQ/billing_questions and the view is indeed billing_questions
Reply

#14
(12-09-2014, 01:33 PM)djcata Wrote: ok

this is the controller part :

PHP Code:
<?php
class home extends Controller {

    function 
__construct(){
 
       parent::Controller();
 
       //$this->output->enable_profiler(TRUE);
    
}

    public function 
all_newsletters(){
        
$this->load->view('all_newsletters',array(
        ));
    }
}
?>

this is .htaccess :

Code:
DirectoryIndex index.php
Options +FollowSymLinks
#redirect from site without www to www without index.php version
RewriteCond %{HTTP_HOST} ^mysite.com [NC]
RewriteRule ^(.*)$ http://www.mysite.com/$1 [L,R=301,NC]

RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

#remove index.php from url
RewriteBase /
RewriteCond $1 !^(index\.php|import|sitemap[0-9]+\.xml.gz|cgi-bin/|imageuploader|images/|css/|js/|swf/|robots\.txt|test\.php)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

after i enabled profiler in base controller class i get profiler reports for all controller but the view that should be at www.mysite.com/home/all_newsletter does not work , shows another thing and does not show profiler information
and i have some problems with url , as they are appending like this :
/FAQ/billing_questions/contact_us/terms_of_use/provider/edit/

so i go first to  /FAQ/billing_questions and after that if i go to contact_us it gets appended and like this if i go to terms_of_use and provider/edit/ even if profiler show the controller/method as FAQ/billing_questions and the view is indeed billing_questions


What version of CI do you use?
Upgrade the CI version ....
Romanian CodeIgniter Team :: Translations :: Comunity :: Developers
http://www.codeigniter.com.ro
Reply

#15
i am using 1.7.3 because i inherited like this .... i am not sure about upgrade , i think it will be a lot of changes .... i do not understand that part with url appending , why is happeing , maybe i resolve and do not need to upgrade
Reply

#16
(12-09-2014, 01:52 PM)djcata Wrote: i am using 1.7.3 because i inherited like this .... i am not sure about upgrade , i think it will be a lot of changes .... i do not understand that part with url appending , why is happeing , maybe i resolve and do not need to upgrade

The best thing is to upgrade...trust me.
How big is your app?
I have some spare time and i could help you to upgrade it to CI 3.
Romanian CodeIgniter Team :: Translations :: Comunity :: Developers
http://www.codeigniter.com.ro
Reply

#17
i have some file , is not too big but is something .... problem is i did not develop ii and the person who uses the application is in process of moving the application to a new platform with new framework so i am not sure it worth the trouble .... the application worked but i wanted to put some redirect to solve Google indexing pages with index.php and now i solved that and i have problem with this
Reply

#18
(12-09-2014, 02:03 PM)djcata Wrote: i have some file , is not too big but is something .... problem is i did not develop ii and the person who uses the application is in process of moving the application to a new platform with new framework so i am not sure it worth the trouble .... the application worked  but i wanted to put some redirect to solve Google indexing pages with index.php and now i solved that and i have problem with this

If the app worked, go back step by step and see what you did.
What was your solution for Google problem?
Romanian CodeIgniter Team :: Translations :: Comunity :: Developers
http://www.codeigniter.com.ro
Reply

#19
yes it worked but if i make it work i will not be able to solve google indexing

this is the solution for google :
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

but i have another rule for removing index.php :
RewriteBase /
RewriteCond $1 !^(index\.php|import|sitemap[0-9]+\.xml.gz|cgi-bin/|imageuploader|images/|css/|js/|swf/|robots\.txt|test\.php)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

(12-09-2014, 02:05 PM)Dracula Wrote:
(12-09-2014, 02:03 PM)djcata Wrote: i have some file , is not too big but is something .... problem is i did not develop ii and the person who uses the application is in process of moving the application to a new platform with new framework so i am not sure it worth the trouble .... the application worked  but i wanted to put some redirect to solve Google indexing pages with index.php and now i solved that and i have problem with this

If the app worked, go back step by step and see what you did.
What was your solution for Google problem?
Reply

#20
(12-09-2014, 02:10 PM)djcata Wrote: yes it worked but if i make it work i will not be able to solve google indexing

this is the solution for google  :
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

but i have another rule for removing index.php :
RewriteBase /
RewriteCond $1 !^(index\.php|import|sitemap[0-9]+\.xml.gz|cgi-bin/|imageuploader|images/|css/|js/|swf/|robots\.txt|test\.php)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]


(12-09-2014, 02:05 PM)Dracula Wrote:
(12-09-2014, 02:03 PM)djcata Wrote: i have some file , is not too big but is something .... problem is i did not develop ii and the person who uses the application is in process of moving the application to a new platform with new framework so i am not sure it worth the trouble .... the application worked  but i wanted to put some redirect to solve Google indexing pages with index.php and now i solved that and i have problem with this

If the app worked, go back step by step and see what you did.
What was your solution for Google problem?


If you try this in your .htaccess ?


Code:
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

Options +FollowSymLinks
RewriteEngine on

# Send request via index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
Romanian CodeIgniter Team :: Translations :: Comunity :: Developers
http://www.codeigniter.com.ro
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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