my facebook application coded in CodeIgniter, located on hostgator, was working fine before i switched to secure URL. A few words about application.

Site URL: http://sitename.com/

canvas URL: http://sitename.com/fbapp/

canvas Secure URL: https://secure10977.hostgator.com/~cpanelUser/sitename.com/fbapp/

CodeIgniter Config file: $config['base_url'] = 'https://secure10977.hostgator.com/~cpanelUser/sitename.com/fbapp/'

Now after i use application it loads fine however when i attempt to fetch somedata using ajax on application page i recieve a URL not found error. Ajax will publish data to following URL.

https://secure10977.hostgator.com/~cpanelUser/sitename.com/fbapp/canvas/match

where canvas is controller and match is method.

Can someone let me know so why do i recieve a 404-page not found error on ajax call?

Searching at the ajax url, it appears as if you are utilizing pretty web addresses? Have a look inside your .htaccess apply for any problem rewrites.

The primary application works fine because it will just call the default document (index.php).

A good way to check this is to try and access

https://secure10977.hostgator.com/~cpanelUser/sitename.com/fbapp/index.php/canvas/match

Best of luck :)

UPDATE:

Lengthy shot, but attempting to imagine what your .htaccess rewrite rule appears like, if it's something similar to:

RewriteRule ^(.*)$ index.php/$1 [L,QSA]

Try altering it to:

RewriteRule ^(.*)$ /~cpanelUser/sitename.com/fbapp/index.php/$1 [L,QSA]