Can I do an if/then/else in htaccess?

后端 未结 5 797
名媛妹妹
名媛妹妹 2020-12-19 07:42

I have a site that serves up certain content based on the subdomain. So it is the same set of files, and maybe the header and some info in the site pages changes based on t

5条回答
  •  离开以前
    2020-12-19 08:01

    You can use pseudo else with an exclamation mark. See the second directive in the example below MemCache vs !MemCache:

    
       LoadModule mem_cache_module   modules/mod_mem_cache.so
    
    
       LoadModule cache_disk_module   modules/mod_cache_disk.so
    
    

    Taken from the apache docs: https://httpd.apache.org/docs/2.4/mod/core.html#ifdefine

提交回复
热议问题