Magento 2 add query string to url when redirect to 404 pageMagento Collection addFieldToFilter complicated AND/OR query404 not found in magento2How to fix Magento 2 2.0.0-RC Admin page not found after installationMy Custom Module is redirecting to 404 page in Magento2 CR2Error when editing products on Magento 2Knockout JS custom scope binding404 not found error when new form, controller is addedMagento2, How to pass product data as query string in Url using JSON template? Custom ModuleMagento 2 controller redirect on button click in phtml fileAdd query string to url when redirect to 404 page

90's TV series where a boy goes to another dimension through portal near power lines

Does a druid starting with a bow start with no arrows?

In Romance of the Three Kingdoms why do people still use bamboo sticks when papers are already invented?

Doing something right before you need it - expression for this?

Is "remove commented out code" correct English?

Infinite Abelian subgroup of infinite non Abelian group example

Theorems that impeded progress

Why does Arabsat 6A need a Falcon Heavy to launch

What's the difference between 'rename' and 'mv'?

What is going on with Captain Marvel's blood colour?

Western buddy movie with a supernatural twist where a woman turns into an eagle at the end

If human space travel is limited by the G force vulnerability, is there a way to counter G forces?

Is the Joker left-handed?

How to say in German "enjoying home comforts"

Today is the Center

Brothers & sisters

Can a rocket refuel on Mars from water?

Stopping power of mountain vs road bike

How to take photos in burst mode, without vibration?

Why does Kotter return in Welcome Back Kotter

UK: Is there precedent for the governments e-petition site changing the direction of a government decision?

Why are electrically insulating heatsinks so rare? Is it just cost?

Reserved de-dupe rules

1960's book about a plague that kills all white people



Magento 2 add query string to url when redirect to 404 page


Magento Collection addFieldToFilter complicated AND/OR query404 not found in magento2How to fix Magento 2 2.0.0-RC Admin page not found after installationMy Custom Module is redirecting to 404 page in Magento2 CR2Error when editing products on Magento 2Knockout JS custom scope binding404 not found error when new form, controller is addedMagento2, How to pass product data as query string in Url using JSON template? Custom ModuleMagento 2 controller redirect on button click in phtml fileAdd query string to url when redirect to 404 page






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















Magento 2 custom module i am trying to add query param
https://test.com/index?id=L_FRR3039-ODKLWG-GP4QPY



if i give above format getting 404 page not found



https://test.com/index?id=L_FRR3039



it working fine
even
https://test.com/index?id=L_FRR3039-ODKLWG_GP4QPY this is also working



it is not taking




-




multiple hyphens remaining all special characters taking
can anyone help me in this










share|improve this question






















  • Are you trying to get that query param in your custom controller?

    – Jeeva Chezhiyan
    yesterday











  • yes, test.com/pawan?id=L_FRR3039-ODKLWG-GP4QPY.

    – Pawankumar
    yesterday


















1















Magento 2 custom module i am trying to add query param
https://test.com/index?id=L_FRR3039-ODKLWG-GP4QPY



if i give above format getting 404 page not found



https://test.com/index?id=L_FRR3039



it working fine
even
https://test.com/index?id=L_FRR3039-ODKLWG_GP4QPY this is also working



it is not taking




-




multiple hyphens remaining all special characters taking
can anyone help me in this










share|improve this question






















  • Are you trying to get that query param in your custom controller?

    – Jeeva Chezhiyan
    yesterday











  • yes, test.com/pawan?id=L_FRR3039-ODKLWG-GP4QPY.

    – Pawankumar
    yesterday














1












1








1








Magento 2 custom module i am trying to add query param
https://test.com/index?id=L_FRR3039-ODKLWG-GP4QPY



if i give above format getting 404 page not found



https://test.com/index?id=L_FRR3039



it working fine
even
https://test.com/index?id=L_FRR3039-ODKLWG_GP4QPY this is also working



it is not taking




-




multiple hyphens remaining all special characters taking
can anyone help me in this










share|improve this question














Magento 2 custom module i am trying to add query param
https://test.com/index?id=L_FRR3039-ODKLWG-GP4QPY



if i give above format getting 404 page not found



https://test.com/index?id=L_FRR3039



it working fine
even
https://test.com/index?id=L_FRR3039-ODKLWG_GP4QPY this is also working



it is not taking




-




multiple hyphens remaining all special characters taking
can anyone help me in this







magento2 query https querystring






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked yesterday









PawankumarPawankumar

373318




373318












  • Are you trying to get that query param in your custom controller?

    – Jeeva Chezhiyan
    yesterday











  • yes, test.com/pawan?id=L_FRR3039-ODKLWG-GP4QPY.

    – Pawankumar
    yesterday


















  • Are you trying to get that query param in your custom controller?

    – Jeeva Chezhiyan
    yesterday











  • yes, test.com/pawan?id=L_FRR3039-ODKLWG-GP4QPY.

    – Pawankumar
    yesterday

















Are you trying to get that query param in your custom controller?

– Jeeva Chezhiyan
yesterday





Are you trying to get that query param in your custom controller?

– Jeeva Chezhiyan
yesterday













yes, test.com/pawan?id=L_FRR3039-ODKLWG-GP4QPY.

– Pawankumar
yesterday






yes, test.com/pawan?id=L_FRR3039-ODKLWG-GP4QPY.

– Pawankumar
yesterday











1 Answer
1






active

oldest

votes


















1














Please try this,



Add this in your custom controller contructor.



public function __construct(Context $context,MagentoFrameworkAppRequestHttp $request)
$this->request = $request;
parent::__construct($context);


public function getIddata()

// use
$this->request->getParams(); // all params
return $this->request->getParam('id');



You can get the param using this $this->getIddata(); in you controller file.






share|improve this answer























  • it helped for my issue

    – Pawankumar
    yesterday











  • If this helped means please accept the answer. It'll helpful for others

    – Jeeva Chezhiyan
    yesterday











  • accepted already

    – Pawankumar
    yesterday











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f268600%2fmagento-2-add-query-string-to-url-when-redirect-to-404-page%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














Please try this,



Add this in your custom controller contructor.



public function __construct(Context $context,MagentoFrameworkAppRequestHttp $request)
$this->request = $request;
parent::__construct($context);


public function getIddata()

// use
$this->request->getParams(); // all params
return $this->request->getParam('id');



You can get the param using this $this->getIddata(); in you controller file.






share|improve this answer























  • it helped for my issue

    – Pawankumar
    yesterday











  • If this helped means please accept the answer. It'll helpful for others

    – Jeeva Chezhiyan
    yesterday











  • accepted already

    – Pawankumar
    yesterday















1














Please try this,



Add this in your custom controller contructor.



public function __construct(Context $context,MagentoFrameworkAppRequestHttp $request)
$this->request = $request;
parent::__construct($context);


public function getIddata()

// use
$this->request->getParams(); // all params
return $this->request->getParam('id');



You can get the param using this $this->getIddata(); in you controller file.






share|improve this answer























  • it helped for my issue

    – Pawankumar
    yesterday











  • If this helped means please accept the answer. It'll helpful for others

    – Jeeva Chezhiyan
    yesterday











  • accepted already

    – Pawankumar
    yesterday













1












1








1







Please try this,



Add this in your custom controller contructor.



public function __construct(Context $context,MagentoFrameworkAppRequestHttp $request)
$this->request = $request;
parent::__construct($context);


public function getIddata()

// use
$this->request->getParams(); // all params
return $this->request->getParam('id');



You can get the param using this $this->getIddata(); in you controller file.






share|improve this answer













Please try this,



Add this in your custom controller contructor.



public function __construct(Context $context,MagentoFrameworkAppRequestHttp $request)
$this->request = $request;
parent::__construct($context);


public function getIddata()

// use
$this->request->getParams(); // all params
return $this->request->getParam('id');



You can get the param using this $this->getIddata(); in you controller file.







share|improve this answer












share|improve this answer



share|improve this answer










answered yesterday









Jeeva ChezhiyanJeeva Chezhiyan

788724




788724












  • it helped for my issue

    – Pawankumar
    yesterday











  • If this helped means please accept the answer. It'll helpful for others

    – Jeeva Chezhiyan
    yesterday











  • accepted already

    – Pawankumar
    yesterday

















  • it helped for my issue

    – Pawankumar
    yesterday











  • If this helped means please accept the answer. It'll helpful for others

    – Jeeva Chezhiyan
    yesterday











  • accepted already

    – Pawankumar
    yesterday
















it helped for my issue

– Pawankumar
yesterday





it helped for my issue

– Pawankumar
yesterday













If this helped means please accept the answer. It'll helpful for others

– Jeeva Chezhiyan
yesterday





If this helped means please accept the answer. It'll helpful for others

– Jeeva Chezhiyan
yesterday













accepted already

– Pawankumar
yesterday





accepted already

– Pawankumar
yesterday

















draft saved

draft discarded
















































Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f268600%2fmagento-2-add-query-string-to-url-when-redirect-to-404-page%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

Area configuration aggregation error after install Porto themeMagento 2.1 CE Installed but front/backend not loading/workingCSS not loading on page within Magento 2 pageCannot install module in Magento 2no commands defined in the “setup” namespace. in Magento2Magento 2: Static files are present but shows 404Why do i have to always run the commands to clean cache in Magento 2.1.8?Failure reason: 'Unable to unserialize value.'Error 500 after magento migrationIn production mode the site does not loadMagento 2 : Error 500 after installing

Middle Expansion Olielle Resaix Definition: Uttering songs of triumph shouting with joy triumphant exulting Sejunction Journal 붙다 달 고급 품목 외출 The stretch trades the screeching tin. Definition: The act of speaking with a drawl a drawl Cough Sand Definition: An uproar a quarrel a noisy outbreak Shake Iron Publicize Horse House Baby 사과 Resaix Flaggy Jelly Temporary Unequaled Puppet A drop in the bucket Shrew 성격 회원 성질 미팅 The burn frames the tacky quality. Materialistic The smoke reduces the way. Yammoe Nondescript Cheek 얼굴 배 약하다 날리다 타다 The illegal country shows the iron. Help Rule Drearien Smoke Teaching Meaty Wasp Abraham Lincoln Jaws 진심 수리하다 Size Cork Idea Convert Think Lark John Lennon 거울 청소 군 추천하다 아이스크림