Welcome To Snipplr
Everyone's Recent PHP Snippets Tagged redirect
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
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
1148
posted 9 years ago by apphp-snippets
Statt mit .htaccess kann eine 301-Weiterleitung auch über php erfolgen
0
1062
posted 10 years ago by ulfinger
[ Yii Framework ] Use this to redirect to previous page or last request URL
0
1044
posted 11 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
830
posted 12 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
16816
posted 12 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
928
posted 12 years ago by FatFolderDesigner
PHP 301 redirect code for giving a page a 301 permanently moved code
0
786
posted 13 years ago by bigroadtrip
Issues a check to see if the "www" is included, if not, forces "www" to be appended to the URL in question.
1
864
posted 13 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
960
posted 13 years ago by adambundy
Prevent direct access to php file (Prevenir acesso direto ao arquivo php)
0
931
posted 13 years ago by cdohost
If your page has already sent headers to the browser you cant redirect with headers('Location:' . $url);
But you can use the following:
0
750
posted 13 years ago by prwhitehead
Though an old post, this is my solution that's been pieced together from various comments on the article linked above.
1
1452
posted 14 years ago by beneberle
A blank search in wordpress returns all the posts, which could be taken as duplicate content if that got indexed.
0
837
posted 14 years ago by baires
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
846
posted 14 years ago by redhatmatt
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
838
posted 15 years ago by scopefragger
Just a function for correct redirecting
*UPD1* header added for Google Chrome
0
709
posted 15 years ago by kirik