| | |
Redirects http://domain to http://www.domain
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: May 2008
Posts: 31
Reputation:
Solved Threads: 0
Hello all.
I have a problem with my site.
Well there are some times that when i click on a link from the recent activity I get my custom error 404 page.
This happens when the url is http://domain.com/.............
The problem is solved and i can get inside the link when I add the www
Also, when I log in having http://www.domain all the links are having www.
When I remove the www , it shows all the links not having the www.
If i logged in with www , and remove www it shows that I am not logged in!
The conclusion is : I guess the site is seperated into two, to the http://domain.com/............. and http://www.domain.com/.............
Maybe this is a server mistake, I do not know.
Please help me about this and tell me if there is a chance to edit the files and put a www in it.
Also is there any script that detects whether the user is visiting the site without the www and redirecting it to the www one ?
Thank you.
I have a problem with my site.
Well there are some times that when i click on a link from the recent activity I get my custom error 404 page.
This happens when the url is http://domain.com/.............
The problem is solved and i can get inside the link when I add the www
Also, when I log in having http://www.domain all the links are having www.
When I remove the www , it shows all the links not having the www.
If i logged in with www , and remove www it shows that I am not logged in!
The conclusion is : I guess the site is seperated into two, to the http://domain.com/............. and http://www.domain.com/.............
Maybe this is a server mistake, I do not know.
Please help me about this and tell me if there is a chance to edit the files and put a www in it.
Also is there any script that detects whether the user is visiting the site without the www and redirecting it to the www one ?
Thank you.
You can do it this way... Simply insert this bits of code inside the head section of your default page...
javascript Syntax (Toggle Plain Text)
<script type="text/javascript"> <!-- /* To ensure that it will be loaded with appropriate ext. */ window.onload = function() { window.location = 'http://www.yourdomain.com'; } //--> </script>
![]() |
Similar Threads
- IE7 Browser Redirects (Viruses, Spyware and other Nasties)
- cloaking (Search Engine Optimization)
- Redirecting a Directory or page... (Linux Servers and Apache)
- This Should be Easy for You Guys! (Linux Servers and Apache)
- Compiling Programs (C++)
- another newbie with alot of redhat and apache server Q'S (Linux Servers and Apache)
- Pr and redirects (Search Engine Optimization)
- Computer extremely slow - can you please help tell me what's wrong? (Viruses, Spyware and other Nasties)
- Radical Vision, LLC - 2 Months Free - 4 GB Disk Space / 45GB BW / Unlim. Domains (Web Hosting Deals)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: tooltip style popup
- Next Thread: Dynamic Table Creation
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
ajax ajaxexample ajaxjspservlets array autoplay blackjack browser captchaformproblem checkbox child class close codes date debugger dependent developer disablefirebug dom editor element embed engine events explorer ext file firefox flash form forms game gears getselection google gxt hiddenvalue highlightedword hint html ie7 ie8 iframe internet java javascript javascripthelp2020 jquery jsf jsfile jsp jump libcurl maps marquee masterpage math matrixcaptcha media mysql object onerror onmouseoutdivproblem onreadystatechange parent passing paypal pdf php player position post programming rated redirect runtime safari scriptlets scroll search security session shopping size software solutions star stars stretch synchronous toggle tweet unicode variables web webkit webservice window wysiwyg \n





