Forum Moderators: phranque

Message Too Old, No Replies

Mod Rewite and CMOD question.

Is what I have been told true?

         

aspect

1:02 pm on Mar 15, 2006 (gmt 0)

10+ Year Member



I have just set up a website on some web space.
I have owned the space for a while and had some domains parked on it. I have bought a new domain and my server removed all the old domains.

I set/installed Wordpress 2.0.2 - as yet I have changed nothing about the install, so there are no plug-ins, I never even changed the style sheet.
However, I did add a new user which caused wordpress to email, the email address was the old domain that was on that space and not the new one.

I got myself FileZilla (I normally use Dreamweaver for FTP) and uploaded an empty text file which I changed to .htaccess. I then changed the permissions for this to 666.

I then enabled Permalinks on Wordpress which successfuly changed the .htaccess file.

However, when I click on the address for the permalinks, I get a 404.
On firefox, a line in the 404 reads:-
Apache/1.3.29 Server at www.my-OLD-domain-name.com Port 80

Incase you missed that, the 404s are comming back with the old domain name on them - which may or not be relavant?

The code written in the .htaccess file is:-

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule . /index.php [L]
</IfModule>

I have tried everything and cannot get this to work. The guy at my hosting company is being very unhelpful and now seems to have stopped answering my mail. But when he was talking to me, said that FTP software is no good for setting permissiona on .htaccess files and that I should 'shell' the commands in. (When I asked him what the hell this means, he told me to google it).
He says that .htaccess files are enabled and that other people are using them. He also tells me that this is a question for designers and that he is only a server expert and doesn't know anything about htaccess. And if I want any more questions answered it will cost me £50 per hour.

I may be being a bit of a pain, but all I really want to know is if I am wasting my time? Is the server set up right or am I doing something wrong? I read up on .htaccess and added in some of my own code which caused me to get a databse error page instead of a 404 - so obviously, the server isn't ignoring the file.

I'm really just after some pointers as to what the problem might be because I have no idea where I may be going wrong.
And would using Shell really make a difference?

jdMorgan

12:54 am on Mar 16, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If the code you posted is *all* the code in your top-level .htaccess file, and if the index.php file is not set up to handle errors, then it's probably a server config problem. ServerName, ServerAlias, or NameVirtual host is mis-set, and UseCanonicalName is 'On'.

If you have other code in the .htaccess file, or if index.php normally does all of your error handling, then look into that code.

FTP should work fine to set permissions. As long as the file 'takes' the permissions you specify, then it's working. There's no difference between permissions set by FTP and those set using *nix shell access (e.g. Telnet), so if you can read back the permissions and they match what you set, then no problem.

Jim

aspect

8:52 pm on Mar 16, 2006 (gmt 0)

10+ Year Member



Thank you very much for your help.

That gave me the amunition I needed to go back to my hosting company and get the guy handling my acount to say he would look into the issue without talking money.

Thanks again.

jdMorgan

6:58 pm on Mar 17, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Also, in some server installations, it is necessary to add

Options +FollowSymLinks

ahead of any mod_rewrite directives, in order to enable mod_rewrite.

Jim