Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6955847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:47:28+00:00 2026-05-27T14:47:28+00:00

In my indexAction() I want to redirect to a php file which is located

  • 0

In my indexAction() I want to redirect to a php file which is located in public folder named login.php.Now When I run this project as giving the url http://example.com:8881/index, it executes.In indexAction I have specified as $form_object = new Application_Form_Login().This form has a submit button and when submit button is clicked,in indexAction() I have specified as

if($form_object->isValid($login_data))
{ 
      $this->_helper->redirector->gotoUrlAndExit('/public/login.php'); 
} 

Because I want to redirect to login.php which is located in public folder.But when I click on submit url changes from http://example.com:8881/index to http://example.com:8881/public/login.php and says an error as Invalid controller specified (public) .I know why this error has occured because in url zend treats the public as controller which is not there.Now this checking should be disabled by the zend so that we can call that php file otherwise in url after the localhost everything will be treated as controller/action.What to do now for above stated requirement?Should I place the login.php file in other folder?What else has to be done?

Please suggest me.Its very much needed.Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T14:47:29+00:00Added an answer on May 27, 2026 at 2:47 pm

    /public/ should never appear in your URLs. Sounds like you simply want to redirect to /login.php:

    $this->_helper->redirector->gotoUrlAndExit('/login.php'); 
    

    If this doesn’t work please edit your question to include the contents of your .htaccess file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a requirement.In my indexAction() I want to call a php file e.g.
I am trying to write an php twitter script which will be run by
This is what I want to do: class IndexController extends Zend_Controller_Action { public function
Thats basically my code (simplified): class IndexController extends Zend_Controller_Action { public function indexAction(){ $this->view->setBasePath(APPLICATION_PATH
Take for example the following controller/action: public function indexAction() { return $this->render('TestBundle:TestController:index.html.twig'); } I
I want users to be redirected to the posts index action upon login. But
I'm using ormlite for database interaction in java. Works fine. Now I want to
I new in Zend. Main Question: Is this code good for user login (Its
This seems like a classic rails situation: I want to have a my index
I want to write a before_filter in my controller to identify the action which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.