I want to know that how can i redirect website if someone types mywebsite.com to this www.mywebsite.com ? Is there something to be done with the .htacess file?
4 replies to this topic
#1
Posted 13 November 2011 - 08:51 AM
|
|
|
#2
Posted 13 November 2011 - 09:25 AM
I don't now about .httacess, but I know a lil' PHP will do the trick.
Good luck ~ Committed. :)
<?php header( 'Location: http://www.yourwebsite.com/' ) ; ?>
Good luck ~ Committed. :)
A man can be defined by what he does when no one is looking.
Science is only an educated theory, which we cannot disprove.
Science is only an educated theory, which we cannot disprove.
#3
Posted 13 November 2011 - 09:51 AM
Consult this -> Redirecting web pages in cPanel
And here is the free .htacess redirect file generator Free .htaccess Redirect Generator
And here is the free .htacess redirect file generator Free .htaccess Redirect Generator
Lost!
#4
Posted 13 November 2011 - 12:26 PM
I am unsure on the code but it can 100% be done with htaccess!
#5
Posted 14 November 2011 - 12:05 AM
It may be preferred to redirect the user without provoking PHP to handle it (if that is possible in that installation). The htaccess method, using permanent 3xx redirect will be sufficient.
An issue with the file will likely cause the web page to be blank, or display a 500 error, you can remove the file and ask here if that is the case.
Alexander.
An issue with the file will likely cause the web page to be blank, or display a 500 error, you can remove the file and ask here if that is the case.
Alexander.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









