Reputation: 37
Here is the sample link that my page used to access database values
http://www.examlpe.com/product-line2/sales/'dynamic-value'
and Facebook authentication adds state and code at the end like this and cause an infinite loop of authentication
http://www.example.com/product-line2/sales/'dynamic-value'?state=foo&code=bar
This dynamic value is like lkji98. which is used by MySQL to get desired value from database. My question is how can i get back to the dynamic URL after Facebook authentication redirect
http://www.example.com/product-line2/sales/'dynamic-value'
My current .htaccess file is
Options -Multiviews
Options +FollowSymlinks
RewriteBase /product-line2/sales/
RewriteEngine on
RewriteRule ^([1-9a-z]*)$ index.php\?u=$1 [L]
index.php is used to fetch result from database. If i put redirect url as index.php then it just redirect to index.php with state and code values
http://www.example.com/product-line2/sales/index.php?state=foo&code=bar
the facebook authentication works but dynamic url is lost.
Thank you.
Upvotes: 0
Views: 367
Reputation: 37
Solve problem by QSA.
Options -Multiviews
Options +FollowSymlinks
RewriteBase /product-line2/sales/
RewriteEngine on
RewriteRule ^([A-Za-z0-9-]+)?$ index.php\?u=$1 [QSA,L]
Upvotes: 1