Welcome Guest, Not a member yet? Register   Sign In
I just cant get the anchor to work
#1

[eluser]GrootBaas[/eluser]
Hi everybody,

Ok, thanks for your help in advance ... I JUST CANT FIGURE THIS ONE OUT ... Sad

My URL_HELPER is loaded. I can call other functions inside the helper.

In my form, my code looks like this ...

Code:
<span class=note>&nbsp;&lt;?=anchor('web_root/forgotten_password', $this->lang->line('prompt_user_forgotten_password'))?&gt;</span></p>

My url looks like this after the anchor was selected ...

http://localhost/Igniter/web_root/forgotten_password

This looks correct ... The controller I am calling looks like this ...

Code:
&lt;?php
class Web_root extends Controller {
    
    function __construct(){
        parent::Controller();
        $this->web_auth->check();
        
        
    }
    
    function index()
    {        
        some code here ...
        }

function forgotten_password()
    {    
                    
            //display the form
            $data['heading'] = $this->lang->line('heading_forgot_password');
            $data['page'] = $this->config->item('FAL_forgotten_password_view');

            $this->layout->buildPage($this->config->item('FAL_forgotten_password_view'), $data);
            
        }
    }
#2

[eluser]xwero[/eluser]
What is the problem??
#3

[eluser]GrootBaas[/eluser]
Sorry about that ..

I get HTTP 404 NOT FOUND.

Web page cannot be found
#4

[eluser]jtotheb[/eluser]
Do you use the index.php in your url normally? It's probably that which you are missing.
#5

[eluser]GrootBaas[/eluser]
Not so sure what you are trying to tell me.

In all my controllers I do have the Index function, I also have an index.php file in my root.

I do use .htacces that looks like this ...

Options +FollowSymLinks

<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ /Igniter/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 /index.php
</IfModule>
#6

[eluser]GrootBaas[/eluser]
Is there any Apache configuration, or php.ini which needs to be set? Similar code on another website works perfectly.

I tried using the same website on my current configuration, and the anchors there are not working either on my current configuration.

That is why I think there must be some config issue, or something similar?
#7

[eluser]GrootBaas[/eluser]
Just want to thank you all for your effort in helping me.

I found the problem ...

Inside the httpd.conf file, uncomment the following line

LoadModule rewrite_module modules/mod_rewrite.so

Thanks again.

PS. I sure hope I can save some other developer some time with this post.




Theme © iAndrew 2016 - Forum software by © MyBB