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.

You can do it this way... Simply insert this bits of code inside the head section of your default page...

<script type="text/javascript">
<!--
/* To ensure that it will be loaded with appropriate ext. */
window.onload = function()
{ window.location = 'http://www.yourdomain.com'; }
//-->
</script>

thank you for your reply friend.

Will this redirect the web page, right?

Yeah, something like that. But same location wil take place. If this doesnt solved the issue, let me know...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.