简体   繁体   中英

.htaccess in subfolder

I install a new cms (phpmydirectory) in a subfolder. In the root there is a wordpress with friendly url's.

When I activate the friendly url's in phpmydirectory, I get an 404 error in the categories and locations, but no in the listings. The 404 error appear in the blog template and URL.

How fix the -htaccess so the subfolder read the .htaccess in the subfolder ando no the one in root?

Do you have the subdirectory specified as the $BASE_URL in your defaults.php file for PMD? I'm operating with a similar setup right now, and did not have to make adjustments to the .htaccess file. However, its not competing with a Wordpress install in the root directory (its an older version of phpmydirectory instead), so that might be causing a different issue than my setup.

Apache always reads all .htaccess files along the path to the root directory. This cannot be changed (except for disallowing use of .htaccess alltogether). The best you can get is making sure that rules for mod_rewrite in the parent directory do not apply. This might be possible using

RewriteRule ^(.*)$ $1 [L]

as the last rule in your phpmydirectory directory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM