所以在Wordpress中有一个文件,wp-content / blogs.php,通过Wordpress上传文件。 WP .htaccess中有一个重写规则,将www.blah.com/files/11/01/filename.mp3格式的URL重写为格式为www.blah.com/…/wp-content/blogs的URL .PHP?文件= FILENAME.MP3。 RewriteRule ^(./ )?files /(。)wp-content / blogs.php?file = $ 2 [L] 所以这里是问题:我们已经开启了PHP文件的gzip。 我需要根据查询参数“file”在blogs.php上closures它。 (不仅仅是因为你不应该gzip二进制文件,而是因为gzip压缩.mp3在Firefox和Mac上为Quicktime插件创build了严重的问题。) 但是以下SetEnvIf不适用于通过blogs.php提供的任何文件 – Request_URI总是以.php结尾 SetEnvIfNoCase Request_URI \.mp3$ no-gzip dont-vary 以下方法通过closures通过blogs.php提供的所有文件的gzip来解决问题: <Location /michael/blah/wp-content/blogs.php> SetEnv no-gzip </Location> 但这不是一个好的解决scheme,因为我想通过blogs.php提供的非二进制文件进行压缩。 所以我真正想要的是获取原始 URI的方式,而不是重写的URI,因为原始URI确实以.mp3结尾。 或者,我需要在重写的URI(file = filename.mp3)末尾访问查询参数。 比如,像这样的东西就可以工作,如果它存在的话,那不是: SetEnvIfNoCase Original_Request_URI \.mp3$ no-gzip dont-vary 看起来有一个variablesTHE_REQUEST可以在一个RewriteRule中工作,但对SetEnv来说似乎不可用。 有任何想法吗? 谢谢! 让我知道如果我违反任何规则,这是我第一次在这里发表。
我似乎在我的WordPress博客有一个问题 我在Ubuntu上运行它,永久链接不工作。 它说:“没有find对不起,但你正在寻找一些不在这里的东西。” 看起来这是一个知道的问题,但没有明确的解决办法。 看看这里: http : //wordpress.org/support/topic/302626 请帮忙。
我正在尝试使用mod_disk_cache来加速在WordPress上运行的网站。 每当我启用它 CacheEnable disk / 其余的股票Ubuntuconfiguration我开始得到错误的结果。 当我看到主页是好的,但是当我去一个特定的职位,我得到一个RSS提要。 就像caching返回错误的内容一样。 我已经禁用了我的RewriteRules,因为看起来mod_cache不起作用。 我甚至不知道从哪里开始debugging这样的事情。 有任何想法吗?
我正在build立一个个人的WordPress的网站,并希望能够从其他网站发布到…我的“API密钥”的常见要求。 例如,在Wordpress.com上创build一个站点时,通过邮件将API密钥发送给您,但当然应该比较简单(如果不是指向本地站点上的某个地址)服务器(Ubuntu的服务器)?
我有一个Windows服务器上托pipe的WordPress的博客。 我一直在使用WordPress的自动升级插件一年以上没有任何问题。 但是,最后一次我决定更新到最新版本的Wordpress,事情变得非常糟糕。 在某些时候升级过程结束了一堆PHP错误消息,我的博客不再可访问。 谷歌search了一段时间后,我发现升级插件不适用于最新版本的WordPress。 所以,我的问题是什么是最好的方式来恢复我的博客升级之前的状态? 在升级失败后 ,我立即备份了服务器上的所有文件,并导出了博客使用的MySQL数据库。 我还注意到升级插件在升级之前备份了一些文件。 我尝试的第一件事是用插件replace所有具有备份副本的文件。 但是,这并没有帮助。 我希望这不是一个错误,因为我有升级失败后立即所有文件和数据库的副本。 接下来我想到的是从服务器上删除所有文件,重新安装最新的Wordpress,然后尝试以某种方式逐渐恢复我拥有的备份文件中的插件,主题和内容。 有谁知道是否有更好的方法来恢复自动安装Wordpress? 类似情况下是否有标准程序? 有没有人有自动升级插件相同的问题?
我的博客已经工作了一年多了,但是现在我已经把服务器放在了一个反向代理之后,它陷入了一个无限循环。 其他网站与这个新的代理工作正常; 我仍然可以login等…所以这不是一个cookies问题。 我试过在另一台机器上,它也有同样的问题。 这是我的squid.conf : #HTTP Reversing #Set the port http_port 1337 defaultsite=londinium.arcath.net vhost #Londinium Hosts cache_peer 10.0.0.45 parent 80 0 no-query originserver name=londinium cache_peer_domain londinium londinium.arcath.net #Whitefall cache_peer 10.0.0.40 parent 80 0 no-query originserver name=whitefall cache_peer_domain whitefall .arcath.net .ed-itsolutions.com acl all src 0.0.0.0/0.0.0.0 acl localhost src 127.0.0.1/255.255.255.255 acl to_localhost dst 127.0.0.0/8 acl SSL_ports […]
好的,我通过在线浏览安装了Nginx / PHP / MySQL / WordPress,并且让我input这些重写来启用WordPress的漂亮url: if (-f $request_filename) { break; } if (-d $request_filename) { break; } rewrite ^(.+)$ /index.php?q=$1 last; error_page 404 = //index.php?q=$uri; 这包含在我的域名的虚拟主机中。 我现在想要做的是添加一些redirect/链接缩写重写,这将与我心目中的设置打好关系。 我想将“x.com/y”redirect到“x.com/script.php?id=y”,以获取我发布的所有外部链接。 WordPress的链接设置现在几乎所有的内部链接开始与“新闻”(x.com/news/post-blah,x.com/news/category/1等),但我也有一些根链接指向一些内部内容(x.com/news,x.com/start)。 我猜这会导致一些冲突。 什么是最好的方法来做到这一点? 我从来没有使用Nginx(或任何重写规则),但也许我可以区分“x.com/news”和“x.com/news/”,以使其发挥很好? 我有一个朋友在Apache中设置了这个工作版本,如果我能够再次在Nginx上获得这个版本,那将会很好。
我GOOGLE了一遍又一遍,没有得到的地方,所以我想我会给这个尝试..我有我的httpdocs目录中的OSCommerce。 然后,我有/ WordPress的,但改变了博客的位置到/blog.php与一些MODS。 很好用。 现在从Wordpress添加SEO URL到我的OSC htaccess OSC htaccess; 选项+ FollowSymLinks RewriteEngine On RewriteBase / RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING} RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING} WordPress的htaccess RewriteBase /blog.php/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /blog.php/index.php [L] […]
从/ var / logs / httpd / error-log: [Thu Apr 22 01:41:15 2010] [notice] mod_fcgid: call /var/www/vhosts/mydomain.com/httpdocs/wp-cron.php with wrapper /usr/bin/php-cgi [Thu Apr 22 01:41:15 2010] [notice] mod_fcgid: server /var/www/vhosts/mydomain.com/httpdocs/wp-cron.php(17999) started …The previous line shows up 8661 times… 什么在Cron? Apr 22, 2010 @ 18:25 (1271960731) Twice Daily wp_version_check Apr 22, 2010 @ 18:25 (1271960731) Twice Daily […]
我试图将我的博客从blog.example.com移动到example.com/blog来做到这一点我宁愿不移动磁盘上的任何东西,所以我改变了我的nginxconfiguration文件如下: location /blog { if (!-e $request_filename) { rewrite ^.*$ /index.php last; } root /home/demo/public_html/blog.example.com/current/public/; index index.php index.html index.html; passenger_enabled off; index index.html index.htm index.php; try_files $uri $uri/ @blog; } 这工作很好,但是当我访问example.com/blog nginx寻找: /home/demo/public_html/blog.example.com/current/public/blog/index.php 代替 /home/demo/public_html/blog.example.com/current/public/index.php 有没有一种方法来放入一个重写规则,以便我可以让服务器自动取出/ blog /目录? 就像是 ? location /blog { rewrite \\blog\D \; }