redirect - .htaccess file disappears in filezilla? how to check if file is present or not? -
For some strange reasons my CMS is being logged out if the address bar is not www before the full website name. For example, when we enter xyz.com, it takes me to the website, but then it will show as a login and if I type in www.xyz.com this cookie will be found and I Will show log in.
What do I want to do, when the user type xyz.com, I want it straight (transparent for the user) go to www.xyz.com I want to add that www before xyz.com. I tried to add an .htaccess file to that directory, where index.php exists and it is the code in the htaccess file.
DirectoryIndex index.php
Directory Index www.xyz.com Redirect /index.php
When I call it on the Faff file district Moving the .htaccess file is disappearing.
If you are ready to modify your index.php, You can add:
/ * This is a tempory redirection mysite .com to www.mysite.com * / if ($ _ server ['SERVER_NAME'] == 'mysite.com' ) {$ Redirect = $ _SERVER ['REQUEST_URI']; Header ('Location: http://www.mysite.com'. $ Redirect); }
Comments
Post a Comment