我在网站的子目录中安装了WordPress 3.3.1,用作临时测试站点。似乎是根站点.htaccess
正在为Wordpress wp管理页创建问题。我已经设置了WordPress Address (URL)
和Site Address (URL)
正确指向子目录url。
如果我没有.htaccess
在我的子目录内(wp root)=wp admin(登录页)工作。
如果我添加.htaccess
如下图所示,该页面可以正常工作,如果您登录到wp admin,则可以正常工作BUT 每次尝试保存内容时=空白页,如果aren\'t 登录并尝试登录=空白页。
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /subcataloged/cliens-wp/
RewriteRule ^index\\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
总结:[.htaccess in wp root(www.domain.com/sub/cat/)]=站点(wp admin除外)按预期工作。
[无htaccess]==站点CSS、图像、js被错误地重写到根文件夹,Wp admin工作正常。
我如何解决这个问题?是否有.htaccess
对于WP 3.3.1,我可以使用?
这是我的.htaccess
对于我的OTHER WEB ROOT 现场(非WP):
Header unset Pragma
FileETag None
Header unset ETag
# cache images/pdf/css/js docs for 10 days = 864000, 31536000 = 1 year
<FilesMatch "\\.(ico|pdf|jpg|jpeg|png|gif|js|css)$">
Header set Cache-Control "max-age=31536000, public, must-revalidate"
#Header unset Last-Modified
</FilesMatch>
# cache html/htm/xml/txt diles for 2 days
<FilesMatch "\\.(html|htm|xml|txt|xsl)$">
Header set Cache-Control "max-age=7200, must-revalidate"
</FilesMatch>
#Gzip
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/javascript text/css application/x- javascript application/javascript image/x-icon
</ifmodule>
#End Gzip
# -FrontPage-
RewriteEngine on
RewriteBase /
#Gamla sidor gör rewrite till nya:
RewriteRule ^nyheter/$ %{SCRIPT_URI}senaste-projekt/ [R]
RewriteRule ^webben/$ %{SCRIPT_URI}tips-for-webben/ [R]
###
RewriteRule ^utvalda-projekt/$ / [L]
RewriteRule ^senaste-projekt/$ %{SCRIPT_URI}index.php [L]
RewriteRule ^webbportfolio/$ %{SCRIPT_URI}views/webbport.php [L]
RewriteRule ^universitetet/$ %{SCRIPT_URI}views/uniport.php [L]
RewriteRule ^kontakta-mig/$ %{SCRIPT_URI}views/kontakt.php [L]
RewriteRule ^presentation/$ pres.php [L]
RewriteRule ^tips-for-webben/$ webben.php [L]
RewriteRule ^CV/$ views/cv.php [L]
RewriteRule ^CV-en/$ views/cv_en.php [L]
RewriteRule ^goeco/$ goeco.php [L]
RewriteRule ^eld/$ fire.php [L]
RewriteRule ^movie-night/$ movienight/ [R]
RewriteRule ^webbtutorials/$ tutorials.php [L]
RewriteRule ^sokhjalp/$ search.php [L]
RewriteRule ^valj_ratt_webblasare/$ valja_webblasare.php [L]
RewriteRule ^mina_bloggar/$ blog.php [L]
RewriteRule ^(.*)/lightbox/css/(.+)$ %{SCRIPT_URI}/lightbox/css/$2 [R]
RewriteRule ^(.*)/lightbox/js/(.+)$ %{SCRIPT_URI}/lightbox/js/$2 [R]
RewriteRule ^(.*)/portfolio/(.+)$ %{SCRIPT_URI}portfolio/$2 [R]
RewriteRule ^(.*)/css/(.+)$ %{SCRIPT_URI}css/$2 [R]
RewriteRule ^(.*)/img/(.+)$ %{SCRIPT_URI}/img/$2 [R]
RewriteRule ^(.*)/grafik/(.+)$ %{SCRIPT_URI}/grafik/$2 [R]
RewriteRule ^(.*)/js/(.+)$ %{SCRIPT_URI}/js/$2 [R]
RewriteRule ^(.*)/uni_portfolio/(.+)$ %{SCRIPT_URI}/uni_portfolio/$2 [R]
RewriteRule ^(.*)/dokument/(.+)$ %{SCRIPT_URI}/dokument/$2 [R]
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>