Shopify App proxy redirect to server url laravel

Navdeep_Garg
New Member
3 0 0

Hello,

I am working on Shopify Private app in the Laravel framework. In this app, I am using the Shopify app proxy concept. I have created a custom page in the app which I want the show to the customer. I have added a custom app page link in the Shopify app proxy URL. Everything is working fine except one thing that is proxy URL.

Whenever I have tried to open my app proxy URL by a direct hit in the browser then it will redirect me to my app server's URL. I have to debug this issue but didn't find any solution. Here's the example of my issue for more clarification:-
Example:-
My App custom page URL is https://testserver.in/secure


My App proxy URL is https://teststore.myshopify.com/a/secure


When directly hit above link in the browser then it will redirect me to below link:-


https://testserver.in/secure?shop=teststore.myshopify.com&path_prefix=%2Fa%2Fsecure&timestamp=155928...

 

I have searched regarding this and most of the search results said that this issue comes in the Laravel framework and my app is also in the Laravel framework. Please help me with this. 

 

Thanks,

0 Likes

You would need to create a route by name "secure" in web.php and call controller and return view.

If helpful then please Like and Accept Solution. Free Website Review and advice for sale from Hire us
Shopify Conversion Experts | Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | Shopify SEO | Digital Marketing | Site Speed Optimization | Performance Site Audit
For Quick Chat Whats app | Email: pallavi@oscprofessionals.com | Skype : oscprofessionals-87
0 Likes
Navdeep_Garg
New Member
3 0 0

Thanks for the reply. I have already added a route in web.php and also create a function in the controller from where I call the view file. For more details, Check Screenshots.

 

ss1.png

 

ss.png

 

0 Likes
Mcklen
New Member
12 0 0
Hi man.
Did you solve it?
0 Likes
Mcklen
New Member
12 0 0

I have this problem too.

0 Likes
mctenold
Shopify Partner
42 0 6

@Navdeep_Garg Did you figure this out? I'm having the same issue.

0 Likes
umairakram
Shopify Partner
3 0 0

Hi @Navdeep_Garg 

if you solved this problem, please help me. I'm facing the same problem.

thanks in advance

0 Likes
umairakram
Shopify Partner
3 0 0

I have fixed it. 

just remove the following line of code from public/.htaccess

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
0 Likes