简体   繁体   中英

htaccess on parent directory not permitting subdirectory WordPress view

I am developing a WordPress site in a subfolder for a client at peterpanos.com. His existing site (static html) is utilizing the following htaccess script to switch to some kind of mobile translation:

##BEGIN MOBILE (do not edit below this line)
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ((.*iPhone.*)|(.*iPod.*)|(.*BlackBerry.*)|(.*Android.*Mobile.*)|(.*Windows\ CE.*)|(.*IEMobile.*)|(.*Opera\ Mini.*)|(.*Opera\ Mobi.*))
RewriteCond %{HTTP_COOKIE} !dm_show_classic
RewriteCond %{QUERY_STRING} !no_redirect=true [NC]
RewriteCond %{HTTP_HOST} ^www\. [NC,OR]
RewriteCond %{HTTP_HOST} ^[0-9a-z-]+\.[a-z]+$ [NC]
RewriteCond %{REQUEST_URI} ^/_dm/s/ [NC,OR]
RewriteCond %{REQUEST_FILENAME} !\.(jpg|gif|png|css|js|txt|ico|pdf|bmp|tif|mp3|wav|wma|asf|mp4|flv|mpg|avi|csv|doc|docx|xls|xlsx|ppt|pptx|zip|rar|tar|gz|dmg|iso)$ [NC]
RewriteBase /
RewriteRule ^(.*)$ http://mobile.peterpanos.com/ [R,L]
##END MOBILE

How can I adapt that so I can view the development site at peterpanos.com/wordpress2015? I tried pasting it into my WordPress htaccess after the usual WordPress htaccess language, replacing redirect=true with false, but no go.

要为子目录禁用移动重定向,只需再添加一个条件:

RewriteCond %{REQUEST_URI} !^/wordpress2015

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