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 855 posted 8 years ago by apphp-snippets
Statt mit .htaccess kann eine 301-Weiterleitung auch über php erfolgen
0 775 posted 9 years ago by ulfinger
[ Yii Framework ] Use this to redirect to previous page or last request URL
0 730 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 592 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 12704 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 670 posted 12 years ago by FatFolderDesigner
PHP 301 redirect code for giving a page a 301 permanently moved code
0 552 posted 12 years ago by bigroadtrip
Removes WWW from the current URL, if exists.
1 614 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 607 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 675 posted 12 years ago by adambundy
0 918 posted 12 years ago by sybrex
Prevent direct access to php file (Prevenir acesso direto ao arquivo php)
0 676 posted 12 years ago by cdohost
0 578 posted 12 years ago by jacksaidwhat
0 744 posted 12 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 484 posted 13 years ago by prwhitehead
0 476 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 1110 posted 13 years ago by beneberle
Add this in the functions.php file, in your Wordpress theme.
0 862 posted 13 years ago by ddavidd
0 749 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 610 posted 13 years ago by baires
0 654 posted 13 years ago by sandrews_06
This code wil 301 redirect non-www URLs to the www URL
0 493 posted 13 years ago by r4b87
Hacer una redireccion permanente
2 621 posted 13 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 618 posted 13 years ago by redhatmatt
1 463 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 576 posted 14 years ago by scopefragger
Just a function for correct redirecting *UPD1* header added for Google Chrome
0 494 posted 14 years ago by kirik
0 442 posted 14 years ago by splotchy
« Prev 1 2