I have defined the page url in codeigniter e.g
$route['single_package/(:any)'] = 'dashboard/single_package/';
Now i have passed the encrypted id in url the url looks like
http://localhost/BgTravel/single_package/08b6a10d78fa89a3588423a5e5c688a2435e50228a277f4063869ea4c85b85f81575cfbd3ae0bbc73c2c5416e830599f7296bd9b1450c0681f111cd84f15b974fkwn56uExaGp1AHX88lbnvSdAaPEBYK3c2+bJu1MhO8=
Now the problem is that sometimes the page loads correctly showing all the data, sometimes it says page not found, i have used the encryption library to encrypt id, what should i do to avoid page not found errors.
Related
I am making a program which produces a Random Id and uses that ID in the URL. Now the problem is when I try to access that page or reload that page it says that "Page not Found". My url looks like this: "http://localhost:8080/FinalBrd/event/D8BE8D46".
I want the other users to access the same page with this url. Is it possible?
I am using magento 1.8.1.0 and i have enabled SSL. SSL is purcahsed from Godady and is installed and configured at the server.
I have also set the Base URL in secure section to https://..... . Now when i enable it for front end, and then when i try to go to customer login page (which is served by https), i am always redirected to home page.
I have applied a few fixes, but no one worked.
The fix described on the below link starts a redirect loop and the site never loads.
Magento HTTPS on all website: urls redirect to homepage
Also i have read the following:
http://www.aschroder.com/2012/07/magento-ssl-offloading-with-amazon-elb/
https://magento.stackexchange.com/questions/38250/ssl-issues-with-magento-behind-load-balancer-302-loop
http://blog.ideaday.de/max/2012/12/magento-https-redirect-loop-ssl-offloading-proxies-pound-nginx/
https://www.sonassi.com/knowledge-base/magento-kb/magento-https-redirect-loop/
http://magentocoder.jigneshpatel.co.in/magento-redirection-loop-problem-after-installing-ssl/
And no fix is working for me.
Now i am offering a 50 points bounty for the correct answer.
Can someone give me some idea how to fix this issue?
Thank you
I saw this problem while on a login form submitted via ajax, the login form was loaded as part of a http page as opposed to https, which is not good, and then the login form data submitted by ajax to a https controller url. on success some javascript would try to load a https landing page into the main window.
The problem was magento would redirect the landing page which is what you're experiencing.
To solve hte issues, we loaded the login form by https and dynamically put it into the dom. We used the form action to a https link, and a form submit rather than an ajax post. Then the magento controller would use a redirect in the response to the landing page or an error page.
Go to Your system->confi->web->Session Validation Settings
Validate HTTP_X_FORWARDED_FOR and Validate HTTP_USER_AGENT
this two fields are enable so only disable it ! :)
I am building a wordpress site with this requirement: when the user attempts to navigate to certain pages, they will be forced to fill out a small form (enter their email address) before they can get to the desired page.
On a standalone site, I'd do it like this: on each "protected" page, I'd look for a cookie named "email". If this cookie doesn't exist, redirect to an email capture page, along with a url parameter indicating the page to go to after they enter their email. The email form would call a PHP script that would set the "email" cookie, then redirect to the desired page
How to do this in wordpress? Would I create my cookie testing code in a template and assign that to the protected pages?
Create a template and page for your php code and when user try to navigate to protected pages check for cookie if doesnt exist go to email page (instead it would be fine if the form appears in a pop up window).There when you get the email onsubmit use ajax to go create cookie from php page and once the cookie is set the navigation should take place .you should create a template for the php page ,and give the page id in ajax code
I hope this is what u r looking for.
Hello all
I have a controller which calls a model which returns after a db query an array to my view which prints some json which i can see in my browser.The problem is that this page has a 404 status header for no reason.
Any suggestions?
A page that shouldn't exist is often sends a 404 header in CodeIgniter.
You could do one of the following
Check if you the controller/method exists
Check if you have any routing that may be pointing you to another controller/method
Check if that location can be browsed via a browser
If nothing works, it would be better if you posted some of your code, routing, etc that may help.
How can I have a user authenticate and then download an offline application created specifically for them?
I'm creating a public/private key encryption system for offline use and each user needs to be able to login and "download" their encryption/decryption page (app.php) using a form. This form dumps them on their app.php page, served up with a cache-manifest file. The application needs to store their encryption and decryption keys locally to be used via Javascript. Accessing this page (app.php) without any login information should return an error page. Any updates are made via ajax to api.php and stored in localstorage, so physically downloading the page and saving it somewhere won't work (localstorage doesn't work on local files).
Here's my cache-manifest.php file:
<?php header("Content-Type: text/cache-manifest"); ?>CACHE MANIFEST
# v1.2
app.php
NETWORK:
api.php
Refreshing the application after logging in to it (via a POST request) leads to the error page being displayed instead of the browser loading the cached application.
EDIT:
I suspect the POST request has something to do with the lack of caching. Watching firebug during the initial download progress shows:
POST app.php 200 - Includes the application to be cached
GET app.php 401 - The error page - this is being cached instead
The POST request was the problem, so I had to create a unique download link for each user, then redirect them to that link. The link needs to be able to be hit at least twice from the browser, so I gave each link a timeout of 1 hour before invalidating it. The cache-manifest file also had to be modified with the unique url:
http://.../app.php?instanceid=(md5)
<?php header("Content-Type: text/cache-manifest"); ?>CACHE MANIFEST
# v1.2
app.php?instanceid=<?php echo $_GET['instanceid']; ?>
NETWORK:
api.php