logo-dw

Go Back   Dreamweaver Club Forums > Dreamweaver forums > Dreamweaver General
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 12-02-2010, 09:50 AM   #1
dipster777
 
Join Date: Mar 2010
Posts: 24
Default .htaccess

Hi Can anyone please help me i want to impliment a 301 redirect to revert my site to stay as www. but cant find the .htaccess file with dreamweaver cs5 and when i do find it how do i put the code on and upload it again. i can find the .htaccess file on my server with filezilla so i know its there im just not sure how to modify it.

please help

many thanks
dipster777 is offline   Reply With Quote
Old 12-02-2010, 10:02 AM   #2
davidj
davidj's Avatar
 
Join Date: Sep 2005
Location: The Toon (newcastle upon Tyne)
Posts: 8,258
Default

right click it in zilla and select edit

make sure the following is included in the file

Code:
RewriteEngine on
Then add...

Code:
Options +FollowSymLinks 
RewriteCond %{HTTP_HOST} ^yoursite.com [NC] 
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [L,R=301]
change yoursite.com to your domain
__________________
Would you like to learn PHP from me? Check out -> www.codezenith.co.uk
davidj is offline   Reply With Quote
Old 12-02-2010, 10:46 AM   #3
dipster777
 
Join Date: Mar 2010
Posts: 24
Default

I have tried to do this but it the edit option isnt clickable also it wont let me delete or rename file. and on my server it wont let me remove it.
thanks for the quick reply but pretty stuck again.

can you help further

cheers
dipster777 is offline   Reply With Quote
Old 12-02-2010, 10:57 AM   #4
dipster777
 
Join Date: Mar 2010
Posts: 24
Default cant access .htaccess in filezilla

I have tried to do this but it the edit option isnt clickable also it wont let me delete or rename file. and on my server it wont let me remove it.
thanks for the quick reply but pretty stuck again.

can you help further

cheers

also where do i find the code or where do i turn the rewrite engine on
dipster777 is offline   Reply With Quote
Old 12-02-2010, 12:18 PM   #5
davidj
davidj's Avatar
 
Join Date: Sep 2005
Location: The Toon (newcastle upon Tyne)
Posts: 8,258
Default

in zilla you need to tell it what text editor to use

I suggest notepad++ (google it)...

In Zilla..

menu > edit > settings > file editing

browse for a editor (notepad++);

open the .htaccess file and check it has the directive included
Code:
RewriteEngine on
If not add it to the top of the file and follow my post above
__________________
Would you like to learn PHP from me? Check out -> www.codezenith.co.uk
davidj is offline   Reply With Quote
Old 12-02-2010, 12:33 PM   #6
dipster777
 
Join Date: Mar 2010
Posts: 24
Default

k Thanks for that will give it a do
dipster777 is offline   Reply With Quote
Old 12-02-2010, 12:49 PM   #7
dipster777
 
Join Date: Mar 2010
Posts: 24
Default Fillezilla

I have tried that and still wont let me edit what should i try next im probably doing something stupid but its really frustrating me
thanks for helping
dipster777 is offline   Reply With Quote
Old 12-02-2010, 12:51 PM   #8
dipster777
 
Join Date: Mar 2010
Posts: 24
Default

when i try to enter the htaccess file it keeps saying unable to retrieve file and i cant delete it enter it or create a new one
dipster777 is offline   Reply With Quote
Old 12-02-2010, 01:00 PM   #9
davidj
davidj's Avatar
 
Join Date: Sep 2005
Location: The Toon (newcastle upon Tyne)
Posts: 8,258
Default

right click the file in zilla and go to file permissions

the numeric value should be 644. If its not change it to 644 and try to edit it

If you still can't edit it change the numeric value to 777 then edit it, save it and then upload it. Last thing to do is change the file back to 644
__________________
Would you like to learn PHP from me? Check out -> www.codezenith.co.uk
davidj is offline   Reply With Quote
Old 12-02-2010, 01:26 PM   #10
dipster777
 
Join Date: Mar 2010
Posts: 24
Default

file permission is set at 755 and it wont let me change any permissions iv tried this on both fillezilla and my server getting very frustrating thanks for helping im totally stumped
dipster777 is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:09 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com