Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 992073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:12:26+00:00 2026-05-16T06:12:26+00:00

for some weird reason my CMS is logging out if the address bar does

  • 0

for some weird reason my CMS is logging out if the address bar does not have www before the full website name. for example, when we enter xyz.com, it takes me to the website but then it wont show as logged in and if i type in http://www.xyz.com it will find the cookie and show me logged in.

What i want to do is, when user types in xyz.com, i want it to directly (transparent to user) go to http://www.xyz.com. I want to add that www before xyz.com. I tried adding a .htaccess file in the directory where index.php is present and this is code in htaccess file.

DirectoryIndex index.php
Redirect xyz.com www.xyz.com/index.php

The .htaccess file is disappearing when i transfer it over ftp filezilla.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T06:12:27+00:00Added an answer on May 16, 2026 at 6:12 am

    If you are willing to modify your index.php you could add the following logic to the top of the file:

    /*This is a tempory redirection from mysite.com to www.mysite.com*/
    if($_SERVER['SERVER_NAME'] == 'mysite.com')
    {
        $redirect =     $_SERVER['REQUEST_URI'];
        header( 'Location: http://www.mysite.com'. $redirect ) ;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some weird reason golferStats is not storing info correctly... I cut out a
For some weird reason, the codes below are first working, then website is redirecting
I have selected the database but for some weird reason it still says that
Im working on a new website, http://blgz.co/ , and for some weird reason, all
For some weird reason this QListView object doesn't have addColumn attribute. Could you explain
I have a bunch of migrations, but due to some weird reason, rails suddenly
For some really weird reason when i set the .Enabled property to false on
For some reason, I am getting a weird overlapping dropdown menu glitch. It works
Could someone please explain this weird phenomenon: http://jsfiddle.net/sPA2V/ For some reason, the box footer
I came around some weird thing in MS SQL server. I have two tables

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.