Shopify App proxy redirect to server url laravel

Highlighted
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
Highlighted

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

Want to modify or incorporate custom changes on store, Hire us
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Whats app
Free Website Review and advice for sale from Shopify Conversion Experts | Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | Shopify SEO ; Digital Marketing & amp | Site Speed Optimization | Performance Site Audit
0 Likes
Highlighted
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
Highlighted
New Member
12 0 0
Hi man.
Did you solve it?
0 Likes
Highlighted
New Member
12 0 0

I have this problem too.

0 Likes
Highlighted
Shopify Partner
40 0 4

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

0 Likes
Highlighted
Shopify Partner
2 0 0

Hi @Navdeep_Garg 

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

thanks in advance

0 Likes
Highlighted
Shopify Partner
2 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