Yii Framework Forum: Hide Url Get Parameters? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Hide Url Get Parameters? Rate Topic: *---- 2 Votes

#1 User is offline   Dhanendran 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 05-April 13

Posted 13 June 2013 - 06:09 AM

Hi Everyone,

How to hide URL GET parameters (http://localhost/test/page?view=about). I've searched lot of posts. They all are saying about rewrite and URL manager, but i couldn't achieve what i want. :(

My scenario is,

I just want to hide the URL GET parameters.

Eg:

http://localhost/test/page?view=about

I wanted to hide ?view=about.

Thanks in Advance.
0

#2 User is offline   Keith 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,562
  • Joined: 04-March 10
  • Location:UK

Posted 13 June 2013 - 06:41 AM

You want to remove them completely from the URL? How would the application know which action to run?

Can you be more specific about how you expect this to work and how you want URLs to look for different pages?
0

#3 User is offline   Dhanendran 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 05-April 13

Posted 13 June 2013 - 07:01 AM

View PostKeith, on 13 June 2013 - 06:41 AM, said:

You want to remove them completely from the URL? How would the application know which action to run?

Can you be more specific about how you expect this to work and how you want URLs to look for different pages?


Thanks for your reply dude :)

I just wanted to hide not remove.

The URL should look like this http://localhost/test/page. Other pages like this http://localhost/test/post. In a simple words my GET parameters should act like POST parameters.

Thanks.
0

#4 User is offline   Keith 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,562
  • Joined: 04-March 10
  • Location:UK

Posted 13 June 2013 - 07:17 AM

Why would you want test/page to lead to the about page? Surely test/about would make more sense. You can do that using the URL routing rules. Regardless, you need to identify the page in some manner in the URL unless you want to make POST requests as the user navigates through the site.

Which controller and action should test/post lead to? Can you give examples of each controller and action that you want to use, along with the URL that you want to access it with?
1

#5 User is offline   Dhanendran 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 05-April 13

Posted 13 June 2013 - 07:53 AM

View PostKeith, on 13 June 2013 - 07:17 AM, said:

Why would you want test/page to lead to the about page? Surely test/about would make more sense. You can do that using the URL routing rules. Regardless, you need to identify the page in some manner in the URL unless you want to make POST requests as the user navigates through the site.

Which controller and action should test/post lead to? Can you give examples of each controller and action that you want to use, along with the URL that you want to access it with?



If it's so, then how i could modify my urlManager? so that "test/about" will be achieved?

Thanks.
0

#6 User is offline   yasen 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 32
  • Joined: 29-October 11
  • Location:Sofia, Bulgaria

Posted 13 June 2013 - 08:07 AM

http://www.yiiframew...-friendly-urls/

or google "yii seo friendly urls"
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users