how to do this in sharepoint 2013
if i enter this url https://example.com/abc/sites/home.aspx it should redirect to https://example.com/abc/sites/home/Menu.aspx
You could edit the home page and insert some js code to redirect to the target page.
Check redirect to another page programmatically
BR
Related
is there any way to get back my users to the current page after they login and redirect to my callback url? for example my current page url is:
https://mydomain.test/post1
then my callback url is:
https:/mydomain.test/callback.php
I tried to add extra parameter to login url but got an error because of the Valid OAuth Redirect URIs url match. my url is dynamic so I need a way to set parameters that changes and start from there.
I have website made on opencart CMS, it is one page website, so I made redirect in home.tpl on page www.domain.com/promo (it is product page)
<?php
header("Location: /promo");
exit();
?>
Now when someone opens www.domain.com he see www.domain.com/promo.
How to make him see only www.domain.com?
Go to the index.php file and look for the router coding, it should look similar to the code below:
$action = new Action('common/home');
You will then have to change 'common/home' to the location of the page you created within Opencart.
For example: to navigate to the login page we will have to change it to 'account/login'
I want a web page (with the url page3) to be displayed differently depending on whether a user on my website is redirected to it from the pages with urls page1 or page2.
How can I access the full url (not just the query parametres in it) from which the user was redirected in the get method in the view associated with the url page3 ?
After reading the docs more thoroughly (thanks for the tip Brandon!), I found request.META['HTTP_REFERER'] did the trick.
I am creating a page in the admin area of Django CMS and I have the redirect field under Advanced Settings. How can I check that the URL entered in that field is a valid URL of an existing Django CMS page?
What should I test? I thought about issuing a request to that URL and if it throws a 404, then invalidate the field, but this sounds a bit too far fetched. What other options do I have?
You can check if your actual page is in a pool of pages
if your page is on the draft mode:
from cms.models import Page
your_page.get_path() in [p.get_path() for p in Page.objects.public().published()]
with a reverse_id:
your_page.get_path() in [p.get_path() for p in Page.objects.all() if p.reverse_id != your_page.reverse_id]
I've used get_page_queryset_from_path from cms.utils.page_resolver and checked that the path entered on the redirect field actually returns a valid Page using the above function.
For example in some cases after POST or GET request I want to redirect user not only to specific page, but to a specific part of page. What would be better: implement this in Django(reconstruct redirect url?) or implement this in javascript?
Why would you want to do it in JS? If you're redirecting to a different page already, just add #whatever to the redirect URL to go direct to the anchor.