Re: IP address relocated
  • 2012/11/30 7:05

  • Karl

  • Just popping in

  • Posts: 12

  • Since: 2012/10/1

Thanks for taking some time on this trabis.

I checked about what Peekay said indeed. I couldn't find his exact line though. My lines or codes were always written in a slightly different way than Peekay..?? I made a change that seemed relevant to me but, 48 hours later nothing changed.

I really think that i just need to have Apache to be able to read or reach my FTP file. Because, everythings seems in order and relevant in my FTP files.

The .htaccess file doesn't seems to be read either..??

- Here below is the .htaccess codes i tried.


Redirect to www using htaccess redirect
Create a .htaccess file with the below code, it will ensure that all requests coming in to domain.com will get redirected to www.domain.com
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$http://www.domain.com/$1 [r=301,nc]

Please REPLACE domain.com and www.newdomain.com with your actual domain name.

Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.


Is that an appropriate set of codes to use?


Re: IP address relocated
  • 2012/11/30 13:25

  • mrphilong

  • Quite a regular

  • Posts: 351

  • Since: 2006/7/14

Hi Karl,

try this

# Turn on rewrites.
RewriteEngine on

# Add trailing slash if path does not contain a period or end with a slash
RewriteCond %{REQUEST_URI} !(.|/$)
RewriteRule (.*) http://www.example.com/$1/ [R=301,L]

# Change http://example.com to http://www.example.com (Optional)
RewriteCond %{HTTP_HOST} ^example.com$
RewriteRule ^/?(.*)$ http://www.example.com/$1 [R=301,L]

# Only apply to URLs on this domain
RewriteCond %{HTTP_HOST} ^(www.)?example.com$

Re: IP address relocated
  • 2012/11/30 15:29

  • Karl

  • Just popping in

  • Posts: 12

  • Since: 2012/10/1

Thanks a lot mrphilong,

The change is done. I haven't done enything in regard with the line: "# Changehttp://example.com tohttp://www.example.com (Optional)" seemed to me that it was already changed in your exemple.

So now, i'll wait for the change to processed. Therefore, i would like to know what we can erase in the "cache" file? There in fact 2 file that i shouldn't erase i think, such as:

- adminmenu.php
- xlanguage.php

*All the rest are a bunch of, (exemple): "http%?fs35363................_rss.html" links. I quest these are the ones that can go?

Thanks a lot again.

Re: IP address relocated

You want to delete EVERYTHING that is within the cache folders. (Keep the cache folders but delete all files within)

The system will rebuild these files as needed. If you do not delete these files you may have some cached files lingering around that are pointing to the old system.

Re: IP address relocated
  • 2012/12/2 2:22

  • Karl

  • Just popping in

  • Posts: 12

  • Since: 2012/10/1


Thanks mrphilong,

I tried to delete what's into the cache file and basicly, only the 2 files that i talk about in my previous message got erased (2 files out of 16). Trying to erase the files, a message pop up a said: "Error! Delete was not successful" So, i can't even erase those files??? Unbelievable..?

Re: IP address relocated

Not a good sign..

You need to access it with root access and you should be able to delete them. If you have a control panel then you may want to delete them from the control panel because you may have different access levels.

Otherwise you may need to contact your hosting company and have them make sure they change all of the ownerships of your files to the proper owner. It sounds to me like when they switched you that some of the file ownerships were lost but it should be a simple fix.

(From the command line it is as simple as a single chown statement assuming you have a linux server. "chown -R webserver:webserver /rootdocfolder" where /rootdocfolder is your root folder and webserver:webserver is the owner and group of what it is supposed to be. Has to be run from root.)

Re: IP address relocated
  • 2012/12/3 9:12

  • Karl

  • Just popping in

  • Posts: 12

  • Since: 2012/10/1

Thanks redheadedrod,

I'm got so many helping responses that i'm now, i gatta watch carefully who i'm saying thanks to.. ah!

You definitly seems to know a thing or 2 about the net. And yes, i do have a linux server.

So, i check again the "cache folder" and there's nothing acan do with the usual/basic commands from the control panel. When i try to open a single file into that cache folder, i get that message:"The file could not be open, closing file."

So, contacting the host compagny, again, they effectively told me that they would try to remove those files for me. Therefore, regading what you just said, don't you think that i should focus more on getting that "chown-R" command in order into my files first? The ownership aspect of the situation here seems to me to be more a priority to be fixed.. isn't it?

*In this case, do we know where and in which file (or files) that "chown-R" command should be added?


Re: IP address relocated

I should rephrase what I said...

Your files either have the wrong owner or have the wrong file permissions.

You SHOULD have a file manager in your control panel or some sort of shell access.

You can look at the permissions and owner/group stuff from a shell, your file manager through your control panel or through your ftp program. (filezilla certainly does.)

The owner/group is the simplest fix but has to be done by the host.

For the permissions it will depend on what you have to use to access them. I believe filezilla will let you change the permissions recursively. (All of your sub folders and all files within. )

You can search the forums for an interchange between myself and trabis to get the right permissions for specific folders and files.

If your hosting company has not removed your files yet you can probably change your cache folders and files within to 0744 and you should be able to delete the files assuming it is a permissions issue and not an ownership/group setting issue.

Do you have shell access on your site? If not then depending on what file manager you have on your panel you may find it easier to change the permissions with filezilla.

Re: IP address relocated
  • 2012/12/4 2:29

  • Karl

  • Just popping in

  • Posts: 12

  • Since: 2012/10/1

Thanks once again,

First, Yes, i do have a FTP file Manager into my hosting account. So, i can see and work stuff up at the "root files" of my website. And i do have the "Files Permissions" option in it too.

(*I do not have access the the normal "Administration board or the normal website builder control panel" though. That website tool is no longer comming up either, as the website itself.) But, the FTP files manager is fine.

Therefore, i tried to adjust the "users permission" to the "Cache Folder & files" and a message pop up saying: "the permission change has been done successfully." Therefore, the small accessibility icon does not show up (at the extreme right of the file name and description) then, i still can't erase anything in there??? I'll have to request that to the hosting compagny.

So, it should be good regrading the "Cache Folder & files" to be erased.

*Now, i am definitly intrigue be the ownership aspect of the website. It sounds like something totally relevant. From what i understand, the hosting compagny should fix that themself.. isn't it?

I'll go with that and will be back with the resultes.

Thanks a lot,

Re: IP address relocated

I did a google search on unix file permissions and group users...

Read this link and it should explain a few things for you...
Understanding Unix Permissions

When a file is created it will take on the group and owner of the current user logged in.

If you can see the user and group for your files a way to see if they are right is to upload a file using your FTP program and then look at the user and group to see if they match up with the files on the system.

Files created by the system will normally take on the owner and group of the webserver user account since they were created by the webserver. They may have a setting wrong somewhere but like I said, you should be able to determine what the user and groups are.

Chances are that if the cache permissions or user/group were wrong then my guess is the same issue is the case with other files and that is likely causing your issues. My guess is that if you repair the permissions issues your system will function properly.

There are ways to repair them but the best way is to make them the same as they were before. But again, I can not remember what the proper permissions for the files are supposed to be. I THINK it is 744 as the base for all files 444 for the mainfile.php and 777 for some folders such as the cache folders but I can not remember 100%. Perhaps Trabis can step in and correct me since he was the one that informed me of the proper permissions before.


Who's Online

63 user(s) are online (45 user(s) are browsing Support Forums)

Members: 0

Guests: 63



Goal: $100.00
Due Date: Feb 28
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits