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 03-23-2017, 09:59 AM   #1
JoeH
 
Join Date: Feb 2012
Location: Shrewsbury UK
Posts: 30
Default .HTACCESS question

Hi, Hope this is the right forum - I'm trying to generate a simple .htacces file for a website. At the moment there are only 3 commands and this is the order they appear in the file:

# KEEP ALIVE #
# OPTIMIZE WEBSITE #
# 404 #

When i add the fourth - #EXPIRE CACHING # between the Optmize and the 404 the 404 fails. Does it matter which order the instructions appear? I can post the code - if this is the right forum. Many thanks Joe.
JoeH is offline   Reply With Quote
Old 03-23-2017, 10:55 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

no order should not cause it. post the code and ill look tomorrow
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 03-23-2017, 10:59 AM   #3
JoeH
 
Join Date: Feb 2012
Location: Shrewsbury UK
Posts: 30
Default

Hi Edbr, that would be great - here's the code:-

## KEEP ALIVE ##
<ifModule mod_headers.c>
Header set Connection keep-alive
</ifModule>
## KEEP ALIVE ##

## OPTIMIZE WEBSITE ##
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>
## OPTIMIZE WEBSITE ##

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
ExpiresByType text/html "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwaveflash "access plus 1 year"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 1 month"
</IfModule>
## EXPIRES CACHING ##

## 404 ##
ErrorDocument 404 /404.html
## 404 ##

Many thanks. Joe.
JoeH is offline   Reply With Quote
Old 03-27-2017, 06:27 AM   #4
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

sorry been off sick so on my phonebut i xant see an error
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 03-27-2017, 07:32 AM   #5
Bill Goldberg
 
Join Date: Jan 2017
Posts: 39
Default

I thought this could be solved easily but now only am getting know that there are this much issues involved in this task.
Bill Goldberg is offline   Reply With Quote
Old 03-27-2017, 09:21 AM   #6
JoeH
 
Join Date: Feb 2012
Location: Shrewsbury UK
Posts: 30
Default

Hi, Many thanks for your time. I've changed the order of the commands - just to see if it made a difference and i gat an Internal Server Error and the page would not load. So i think the problem is server side. I'll contact the guys that 'support' the hosting etc. Many thanks for your time. Joe.
JoeH is offline   Reply With Quote
Old 04-19-2017, 07:24 AM   #7
Bill Goldberg
 
Join Date: Jan 2017
Posts: 39
Default

Thank you very much for the most useful tips.
Bill Goldberg is offline   Reply With Quote
Old 04-22-2017, 04:35 AM   #8
Bill Goldberg
 
Join Date: Jan 2017
Posts: 39
Default

Can we add robots.txt file in htaccess file?
Bill Goldberg is offline   Reply With Quote
Old 04-22-2017, 07:59 AM   #9
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

no point robot tet files are actively searchrd for
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr 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 01:46 PM.


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