[SOLVED] Pretty URL's and redirects

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
User avatar
kidcardboard
Forum Members
Forum Members
Posts: 54
Joined: Mon Sep 28, 2009 5:25 pm

[SOLVED] Pretty URL's and redirects

Post by kidcardboard »

I have pretty URL's enabled on a site I'm developing a module for and have implemented all the necessary routes and such for links within the module. I have a form which allows the user to send some info to a colleague and afterwards is redirected to the page that they came from. My problem is the redirect doesn't use pretty URL's. I've tried using:

Code: Select all

$this->RedirectForFrontEnd($id, $returnid, $action);
and

Code: Select all

$this->Redirect($id, $action, $returnid);
and both take me to the proper page, but with a non-pretty URL.

Am I missing something or am I gonna have to use header() or some other method?
Last edited by kidcardboard on Tue Oct 18, 2011 5:54 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Pretty URL's and redirects

Post by calguy1000 »

That reminds me to deprecate those methods.

use redirect($this->create_url($id,$action,$returnid,....));
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
kidcardboard
Forum Members
Forum Members
Posts: 54
Joined: Mon Sep 28, 2009 5:25 pm

Re: Pretty URL's and redirects

Post by kidcardboard »

Thanks. That did the trick.
Post Reply

Return to “Developers Discussion”