Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged redirect



« Prev 1 2
This example shows you how to create redirection o another directory. It may be useful, for example, when you have a project, placed in sub-directory.
0 940 posted 8 years ago by apphp-snippets
Statt mit .htaccess kann eine 301-Weiterleitung auch über php erfolgen
0 860 posted 9 years ago by ulfinger
[ Yii Framework ] Use this to redirect to previous page or last request URL
0 819 posted 10 years ago by tucq88
Sends the user to a different Drupal page. This issues an on-site HTTP redirect. The function makes sure the redirected URL is formatted correctly.
0 643 posted 11 years ago by dilios
I needed away to redirect to a custom BP component upon login for users and this works great. Add this to your functions file. If you are the admin, it will redirect you to the wp-admin.
0 13857 posted 11 years ago by dnnsldr
This needs to be run on an action, or at least I wanted able to get it to run outside of an action, I suggest template_redirect. More information at the link.
0 726 posted 12 years ago by FatFolderDesigner
PHP 301 redirect code for giving a page a 301 permanently moved code
0 616 posted 12 years ago by bigroadtrip
Removes WWW from the current URL, if exists.
1 673 posted 12 years ago by thewickedchemist
Issues a check to see if the "www" is included, if not, forces "www" to be appended to the URL in question.
1 664 posted 12 years ago by thewickedchemist
Place at the top of your header.php to redirect visitors who are not logged-in to the Wordpress admin. I use this to redirect to a simple HTML 'coming soon' page while sites are in development.
1 762 posted 12 years ago by adambundy
0 978 posted 12 years ago by sybrex
Prevent direct access to php file (Prevenir acesso direto ao arquivo php)
0 743 posted 12 years ago by cdohost
0 624 posted 13 years ago by jacksaidwhat
0 806 posted 13 years ago by kreatific
If your page has already sent headers to the browser you cant redirect with headers('Location:' . $url); But you can use the following:
0 550 posted 13 years ago by prwhitehead
0 528 posted 13 years ago by nosmk
Though an old post, this is my solution that's been pieced together from various comments on the article linked above.
1 1207 posted 13 years ago by beneberle
Add this in the functions.php file, in your Wordpress theme.
0 940 posted 13 years ago by ddavidd
0 813 posted 13 years ago by jaredyeo
A blank search in wordpress returns all the posts, which could be taken as duplicate content if that got indexed.
0 657 posted 13 years ago by baires
0 718 posted 13 years ago by sandrews_06
This code wil 301 redirect non-www URLs to the www URL
0 538 posted 13 years ago by r4b87
Hacer una redireccion permanente
2 688 posted 14 years ago by jrobinsonc
on node/add/save redirect your to a url of your choice in Drupal 6 in your own custom module. (in this my module name is qctpmm, it's simply the content type of page and it's redirecting to user.)
0 666 posted 14 years ago by redhatmatt
1 505 posted 14 years ago by phpleo
Sometimes you just need to mask a script or reject a user from a page this can be done effortlessly using a single line of code. Header location will allow you to redirect a user quickly and without them having any control over the action. A good...
1 644 posted 14 years ago by scopefragger
Just a function for correct redirecting *UPD1* header added for Google Chrome
0 537 posted 14 years ago by kirik
0 508 posted 15 years ago by splotchy
« Prev 1 2