| | |
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 |
acid2 ajax ajaxcode ajaxexample ajaxhelp ajaxjspservlets animate automatically beta box browser captchaformproblem checkbox child close codes css debugger decimal dependent disablefirebug dom download editor element engine enter error events explorer ext file firefox form forms frameworks getselection google gwt gxt hiddenvalue highlightedword hint html htmlform ie7 ie8 iframe index internet java javascript javascripthelp2020 jawascriptruntimeerror jquery jsf jsfile jsp jump listbox maps masterpage math media menu microsoft mp4 object onmouseoutdivproblem onmouseover onreadystatechange parent paypal pdf php player position problem programming prototype redirect regex runtime safari scale scriptlets search security select size software sql textarea unicode w3c window windowofwords windowsxp wysiwyg \n





