mod_rewrite not working htaccess

后端 未结 3 901
孤街浪徒
孤街浪徒 2021-01-27 04:21

I have a website with 11 sub-domains.I have one main htaccess file in the public_html root folder that has the common shared traits like cache

3条回答
  •  再見小時候
    2021-01-27 05:01

    My apologies, I was the one using a bad folder directory system in my website. This is the one is was using

    public_html(www directory) -index.php -vidz(sub-domain) -index.php -days -_imports -css -js -php -content.php -contact.php

    This is my upgraded system

    public_html(www directory) -index.php -vidz(sub-domain) -index.php -content.php -contact.php -assets -_imports -css -js -php

    Which makes it possible to have the links as Mon and use the .htaccess redirect rules below.

    
    
        Options +FollowSymlinks
        RewriteEngine On   
        RewriteRule ^monday$ content.php?day=mon [NC,L]
        RewriteRule ^tuesday$ content.php?day=tue [NC,L]
        RewriteRule ^wednesday$ content.php?day=wed [NC,L]
        RewriteRule ^thursday$ content.php?day=thur [NC,L]
        RewriteRule ^friday$ content.php?day=fri [NC,L]
        RewriteRule ^saturday$ content.php?day=sat [NC,L]
        RewriteRule ^sunday$ content.php?day=sun [NC,L]
        RewriteRule ^contact$ contact.php [NC,L]
    
    

    Thanks to all who answered! It helped me realize this.

提交回复
热议问题