Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 02-17-2009 11:54:07

Sproz
Member
Registered: 02-17-2009
Posts: 55

htaccess help! please!

Hi, sorry if this has been answered a 1000 times but I'm new to this and have just got my site live on the server and moved it up to the root htdocs folder from a test folder, the site works fine but if I try and implement the htaccess file by switching SEO on in the admin then sticking the htaccess file in the root htdocs folder I just get 'forbidden' or 'server error' when trying to access the site? The code for htaccess I was using is;  Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*)-(.*)/(.*)\.html index.php?app=$1&ns=$2&ref=$3 [L,PT]

The website is wwwkitchenfoods.co.uk

Please explain where I'm going wrong, oh and take it easy my brain has fried, it was only last Friday when I hadn't a clue what SQL,PHP etc even was!!!

Thanks!

Offline

 

#2 02-17-2009 12:05:09

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: htaccess help! please!

What, exactly, is the error that you got?  There's a big difference between forbidden and server error. Who is your service provider?  Have you verified with your provider that mod-rewrite is enabled and available to you?

Offline

 

#3 02-17-2009 13:02:50

Sproz
Member
Registered: 02-17-2009
Posts: 55

Re: htaccess help! please!

Hi Dave,
Forgive my apparent lack of knowledge, I'm on what seems a steep learning curve!
I've just run through trying it again, if I set the SEO to true in the admin without the htaccess file in place I get broken links on the site, then after sticking the htaccess file in the servers htdocs folder I get internal servor error message when loading the site, I tried chmoding the htaccess file even to 777 with no luck, restored everything back to before and its ok again??
On another note, whilst I remember! do I need to change some of the permissions on my files after the install to make it safe?
Thanks

Offline

 

#4 02-17-2009 13:04:59

Sproz
Member
Registered: 02-17-2009
Posts: 55

Re: htaccess help! please!

p.s. yes they do allow mod-rewrite, the provider is streamline.net and I'm on the Linux server

Offline

 

#5 02-17-2009 13:14:39

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: htaccess help! please!

Without .htaccess enabling SEO will break all of the links in your site.  That's to be expected.

No permissions need to be changed after installation.

Was the server message you got a 500 error? If it was then something about the .htaccess file is the problem.  You did have it named with the period in front of it correct (.htaccess and not simply htaccess) correct?

According to the support documents available at your provider the first line of .htaccess, Options +FollowSymLinks, may not be needed and may be the source of the server errors.  Try it with just the lines shown below.

RewriteEngine on
RewriteRule ^(.*)-(.*)/(.*)\.html index.php?app=$1&ns=$2&ref=$3 [L,PT]

If that doesn't work either try changing the file permissions for it to 644 (another suggestion from your providers support area).  Last but not least make sure you are FTPing the file to your site as a plain text, ASCII, file and not as a binary file.  Most FTP clients take care of it for you but if things are still failing it's worth double checking.

Offline

 

#6 02-17-2009 13:44:35

Sproz
Member
Registered: 02-17-2009
Posts: 55

Re: htaccess help! please!

Hi Dave, Thanks, the new code has sorted it, you're a star!

What do I need to do to make my site secure? currently the files are all set to 777 after the install, is this ok??

Offline

 

#7 02-17-2009 13:51:25

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: htaccess help! please!

Your site is secure with the permissions set as they are.  During installation CCP creates a .htaccess file in the private directory which prevents anyone from getting to anything in that directory.  There are only a few "public" files that people actually see/use and if it would make you more comfortable you may change those to 755 if you'd like (the skins directory and index.php and admin.php).

Offline

 

Board footer