Debugging of .htaccess

A few days ago I had a problem with the writing of my first htaccess in order to eliminate the URL .html extension. There were problems because I had a Windows Server which I changed to Linux.

Now the question is this: I finally managed to remove the URL .html extension. What I can't do is set an expiration date for all the images (JPEG, PNG, SVG).

My code is working this (deletion of the extension):

RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]

For the Image caching setting, I added the following:

//Caching schema

<FilesMatch "\.(jpg|png|svg)$">

Header set Cache-Control "private, max-age=160704000"

</FilesMatch>

When I added the additional code above I got an internal server error. I don't know what is happening to be honest. If I remove this extra code it will work but I add that so he used.

While you guys have ideas about how to add an Image caching setting? The additional code above does not work

ExpiresActive on

# Expires after 1 month

Header Cache-Control value "max - age = 2592000.

# Expires after 1 day

Header Cache-Control value "max - age = 86400.


Tags: Dreamweaver

Similar Questions

  • Permit "Disable the web process per tab" under debugging, now Safari crashes whenever I try to start it.

    How can I Reset Safari Debug options when Safari does not work? Is there some command line options?  I enabled "Disable web of per-tab processes" and now whenever I try to start Safari crashes.

    Hi WellingtonWlfmn,

    Please update to Safari to the latest version: https://support.apple.com/en-us/HT204416

  • How should I fill in the recent history of compensation if, after choosing "debug a script" and a new attempt, by selecting 'Clear now' no results?

    I'm going to erase everything in the first four categories "clear recent history". I checked all four boxes and "clear now". There was a message from a plugin, but my Flash drive is running, if it's relevant. After the blue circle swirled for some time, there was a message about the script, so I chose "Debug Script". The box closed and now when I open "clear recent history" box "Form & search" is not checked, but the other three are. A file marked 'Old data from Firefox' appeared on my desk. When I select 'Clear now', the farm of the box, but nothing seems to happen, for example, no blue circle. I went to "subject: cache" and there, the files which, I suppose, should be removed if the tool has been a success. I tried refreshing Firefox and repeat the procedure, but it didn't seem to help. My 7 year old computer running Vista, and I think it's the latest version of Firefox. I hope someone can help this tech dinosaur.

    What inputs do you still see?
    Are only records of the web pages visited or some special entries?
    Have you ever used external cleaning software?

    You can try to manually clear the hard disk cache2 folder if there are still a few remnants entered.
    You can find the location of the cache to disk on the subject: the cache page.

  • Firefox 38.0.1 get up errors in the console with JS and CSS htaccess enabled compression

    Hello

    I worked on improving the performance on my Wordpress site, one of the things I've done, I switched to a dynamic delivery of CSS and JS files (so they are compressed by PHP), which has worked very well for the performance tests.

    Now, I ALSO added it to the .htaccess in my JS and CSS (wp - TTC) file on a wordpress site:

    <filesMatch "\.(js|css)$">
    Header set Content-Encoding x-deflate
    # Header set Content-Encoding compress
    # Header set Content-Encoding x-gzip
    </filesMatch>

    to compress JS and CSS files. It works fine on IE, CSS, Android and speed, but the wrong tests, is that the site seems broken in Firefox 38.0.1, it can not load my menus and revolution Slider (image carousel).

    main error seems to be jQuery is not defined...

    Here's a montage that shows thedl.dropboxusercontent.com/u/28979877/FirefoxErrorsCollage.png errors...https://

    is there anything else that I could change in this .htaccess syntax that make each happy browser?

    any thoughts?

    Thank you very much
    Gabrio

    Hello

    I have disabled the function of .htaccess for now...

    We discovered (with assistance from Frank Autoptimize, I can TOTALLY recommend also, it's great!) said that he could not work because that makes the output is compressed, but not actually... compression. If firefox is right, others wrong.

    This should be used, IF the server supports it (ours is not because it is just shared):

    < IfModule mod_deflate.c >

            <FilesMatch "\.(js|css)$">
            SetOutputFilter DEFLATE
        </FilesMatch>
    </IfModule>
    

    so for now, I removed the .htaccess to compress JS and CSS files and FF is happy now.

    Thank you
    Gabrio

  • I want to disable firefox own debugging tools and use FireBug - how?

    Firefox version 31.2.0 (sorry, cannot install any later version) + FireBug version 2.0.5 (now is the last). I want my web pages using the extension FireBug to debug, but I am unable to do this. I don't see a FireBug icon anywhere. When I press the F12 key, I do not see any window of FireBug. I see another instead of FireBug debugging tool. (Can be, there own tool of firefox). But this tool is not a good replacement for FireBug - it has much less features and not convinient in its use. Please, help me to go back to debugging in FireBug.

    I found the solution by myself. And the solution is: FireBug DOWNGRADE to version 2.0.4 and disable autoupdates of it.

  • Error attribute indicating the Django setting should be DEBUG = TRUE when she is currently DEBUG = FALSE. I don't know how to solve this problem. Need help change affecting please!

    I'm trying to access an online simulation via MyMIS Lab of Pearson for a class online. I was using this simulation a couple of days, but when I logged on this morning, the simulation does not open. I copy and paste the error message that appears when I try to open it. Basically, it reads "you see this error because you have DEBUG = True in your file settings to Django. Change False and Django will display a 500 standard page. I have no idea what Django settings are and have studied how to change the setting, but I'm not familiar with this at all. Any help would be greatly appreciated so I can get my homework done! Thank you!!!

    AttributeError at /simLaunch/launch/
    
    'Settings' object has no attribute 'XLSIMS_LAUNCH_URL'
    
    Request Method: 	POST
    Request URL: 	http://econdip.pearsoncmg.com/xlsim/simLaunch/launch/
    Django Version: 	1.5.2
    Exception Type: 	AttributeError
    Exception Value: 	
    
    'Settings' object has no attribute 'XLSIMS_LAUNCH_URL'
    
    Exception Location: 	/vh/docroots/econdip.pearsoncmg.com/prod/virtualenv/lib/python2.6/site-packages/django/conf/__init__.py in __getattr__, line 54
    Python Executable: 	/usr/bin/python
    Python Version: 	2.6.6
    Python Path: 	
    
    ['/vh/docroots/econdip.pearsoncmg.com/prod/virtualenv/lib/python2.6/site-packages',
     '/usr/lib64/python26.zip',
     '/usr/lib64/python2.6',
     '/usr/lib64/python2.6/plat-linux2',
     '/usr/lib64/python2.6/lib-tk',
     '/usr/lib64/python2.6/lib-old',
     '/usr/lib64/python2.6/lib-dynload',
     '/usr/lib64/python2.6/site-packages',
     '/usr/lib64/python2.6/site-packages/gtk-2.0',
     '/usr/lib/python2.6/site-packages',
     '/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info',
     '/vh/docroots/econdip.pearsoncmg.com/prod/server/glservice']
    
    Server time: 	Sat, 30 Aug 2014 14:59:46 -0500
    
    Environment:
    
    Request Method: POST
    Request URL: http://econdip.pearsoncmg.com/xlsim/simLaunch/launch/
    
    Django Version: 1.5.2
    Python Version: 2.6.6
    Installed Applications:
    ('django.contrib.auth',
     'django.contrib.contenttypes',
     'django.contrib.sessions',
     'django.contrib.sites',
     'django.contrib.messages',
     'django.contrib.staticfiles',
     'django.contrib.admin',
     'gldata',
     'econ.ca',
     'econ.ue',
     'gllaunch',
     'datacapture',
     'xlsims')
    Installed Middleware:
    ('django.middleware.common.CommonMiddleware',
     'django.contrib.sessions.middleware.SessionMiddleware',
     'django.middleware.csrf.CsrfViewMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'django.contrib.messages.middleware.MessageMiddleware')
    
    Traceback:
    File "/vh/docroots/econdip.pearsoncmg.com/prod/virtualenv/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response
      115.                         response = callback(request, *callback_args, **callback_kwargs)
    File "/vh/docroots/econdip.pearsoncmg.com/prod/virtualenv/lib/python2.6/site-packages/django/views/decorators/csrf.py" in wrapped_view
      77.         return view_func(*args, **kwargs)
    File "/vh/docroots/econdip.pearsoncmg.com/prod/server/glservice/xlsims/views.py" in launchSim
      23.     if TPIUtils.has_valid_signature(launch_data, url=settings.XLSIMS_LAUNCH_URL, key='bphsc2014'):
    File "/vh/docroots/econdip.pearsoncmg.com/prod/virtualenv/lib/python2.6/site-packages/django/conf/__init__.py" in __getattr__
      54.         return getattr(self._wrapped, name)

    It's a problem with a Python script that runs on the server.
    The site Web needs to solve this problem.
    If the problem persists then contact them by e-mail.

    You can try to clear the cache and delete cookies from this Web site.

    "Clear the Cache":

    • Firefox > Preferences > advanced > network > content caching Web: 'clear now '.

    'Delete Cookies' sites causing problems:

    • Firefox > Preferences > privacy > "Use the custom settings for history" > Cookies: "show the Cookies".
  • Remove app installed with App Manager remove debugging

    I enabled debugging remote on Firefox for Android, connected to App Manager desktop Firefox and press "Refresh".
    Now app is listed in 'Apps' in my Firefox for Android, but not in the app drawer, so now I can't lunch the app or uninstall it.
    Even debugging does not now.
    Is it possible to remmove it even manually? (I have root access on my 4.4.4 Android device)

    "Now the app is listed in 'Apps' in my Firefox for Android" - Yes, I was talking about: apps page, there is no possibility to remove applications from there.

    I have deleted the folder /data/data/org.mozilla.firefox/files/mozilla/webapps and finally apps, but that maybe works only in my case, because I do not have the applications installed on the market, otherwise it could be more difficult because of the need to change webapps.json it.

  • Upgrade to 30.0 now completely ignores htaccess Panel on Web site

    Auto-MIS 30.0 updated yesterday. Now I can't access a site whose connection is a sign of htaccess. The Panel shows not even upward, I just need you just to the error page 'invalid access' servers. Have tried to erase the cache, cookies, etc. nothing works. Colleagues who have not upgraded to 30.0 can always connect without problem.

    See:

    NTLMv1 auth has been disabled, NTLM supported on platforms other than Windows is now obsolete

    Try to toggle this pref to true on the topic: config page.

    • Network.Negotiate - auth.allow - insecurity-ntlm-v1 = true
  • CSS does not not in the browser and have been debugging for hours, is there something I missed?

    Recently, I built a website for a client (boelmanshaw.com) in Wordpress. CSS of the site fits fine in all other browsers (IE, Chrome and Safari), but it does not work in Firefox. I've debugged the HTML code as I could, and I went through the CSS several times to see what could be the problem. I have not found anything that would be a problem. I'm not familiar with php, so I don't know if that would contribute to the problem, as well. I'm new with coding of websites, so any help would be greatly appreciated.

    I see in the error Console that you have made a typo: tour support (instead of a hug {and seems to be.)

    You can also use the Web Console (Web Developer > Web Console;) CTRL + SHIFT + K) to see this error.

    Warning: Expected ',' or '{' but found '('.  Ruleset ignored due to bad selector.
    Source File: http://boelmanshaw.com/wp-content/themes/Ultra/style.css?9d7bd4
    Line: 54
    
    a{color:#003267; text-decoration:none}
    a:hover{text-decoration:underline; color: #535552}
    p{margin:0 0 15px}
    strong{font-weight:700}
    em{font-style:italic}
    li{list-style-type: none}
    #leftlist{float:left; padding-right: 8px}
    #rightlist(float:right}
    small{}
    pre{white-space:pre-wrap; white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; word-wrap:break-word}
    hr{}
    blockquote{border-left:2px solid #CCC; margin:20px; padding:0 0 0 20px}
  • Impossible to debug UIWebview with Safari 9.1

    Recently updated to El Capitan 10.11.4, it comes with Safari 9.1. Now, I'm unable to debug UIWebview on iOS Simulator (tested on 9.2 iOS and iOS 8.4. both don't work). In the setting of safari Simulator are as follows. Inspector Web is running, JavaScript is activated. Website fraud warning is DISABLED. In Safari for Mac menu develop appear, the entrance of Simulator appear when the Simulator was launched but only show JSContext. The UIWebview embedded in our application does not appear in the submenu of the Simulator. All the web pages in safari iOS does not appear as well. Is there a setting that I missed? It worked before the upgrade to 10.11.4

    Hello ahuang105,

    If you are a developer, you cannot act as a user.

    This means that you need to test the Apple software throughout each cycle of beta. You need to do this test on a complete ecosystem "burner" - iOS devices, Mac, Apple ID dedicated to the beta test. Along the way, so something that you develop breaks in all of this, you will be able to report a bug to Apple and to develop an alternative solution in case Apple releases with the bug.

    In the same time, another complete ecosystem production - Apple ID, Mac and iOS devices all dedicated development of production - needs to stay on the most recent version has no crippling bugs. For El Capitan, your guess is as good as mine what build that can be. 10.11.3 I guess.

    For now, I suggest to ask in the developer forums if this bug in particular is fixed in 10.11.5. I have seen engineers Apple recommends this build for Simulator in 10.11.4 problems.

  • Xcode requires additional components to support running and debugging

    Hi all

    Today, I tried to start xcode. And he asks me "xcode requires additional components to support running and debugging. Select installation to add rewuired components.

    Is this ok? Or is my system caught by some funny virus / malware? Is - this caused by the upgrade of 10.11.3 at 10.11.4, is a new version of xcode?

    I have never seen before such a message.

    Greetings from the Germany

    Chris

    Hi Chris,

    The Add ab El Capitan as Xcode keine additional components.

    Hello alles on board!

    VIELLEICHT hilft Dir das yesterday ein wenig!

    https://youtu.be/K-rbWeSL0rY

    Gruss Ralf

  • HP50g - assign the submenu of debugging to a key in user mode

    How to assign the submenu of debugging (in Lshift/PRG/RUN) to a key?

    Thank you

    It's menu 41, so if you set < < MENU 41 > > a key, which will display the Debug menu.

    This is a very key assignment practice: < < 41 MENU DBUG > >.  It takes a program (or the name of a program) at level 1 of the battery and running the debugger on it, with the Debug menu is displayed.  I keep assigned to leftshift-wedge-PRG (i.e. keycode 42.21).

  • I need a version 3.0 - ish of Firefox which is used on a registration site the webmaster has not upgraded and debugged the site to be compatible with Firefox 4.

    The site

    https://Fourwinds.com/OCF/login.php

    only works with Firefox as browser. The webmaster does not have upgraded and debugging for use with Firefox 4. I'm hoping to find a copy of the version 3.0 - ish to be able to access this web site. Any suggestions?

    You can get Firefox 3.6 http://www.mozilla.com/en-US/firefox/all-older.html

    If it's just for a site, an alternative is to keep Firefox 4 but install the portable version of the earlier version of Firefox on your hard drive. You can get http://portableapps.com/apps/internet/firefox_portable - section version inherited at the bottom of this page contains links to older versions of Firefox.

  • I can NOT SE get RID of a pop-up "Just in time debugger": "an exception 'Runtime error' has occurred in the Script. However, no debuggers are registered that can debug this exception. Cannot perform a JIT debugging. "Any advice would be great. Mohamed

    With the help of Firefox 4 on XP Pro SP3 2000 computer.

    See How to: "turn on/off the just-in-time debugging.

  • How long can I use Xcode debugging iphone iPad app?

    I'm developing an application based on reading excel sheet. I want to do app test cases every day, I'm uploading excel sheet to Amazon to see my data in the iphone. So I use Xcode to debug in the iphone 7 5. So I want to use this app for two months. I have not downloaded in the App store. So how long can I use this app in my iphone? Please give me some suggestions. Thanks in advance.

    If you have installed the app from Xcode, you can use it forever.

Maybe you are looking for