我最近为我在一个子域http://technotes.tostaky.biz上维护的博客设置了一个新的URL http://www.mytechnotes.biz 。 redirect在以下情况下起作用: technotes.tostaky.biz -> www.mytechnotes.biz www.technotes.tostaky.biz -> www.mytechnotes.biz 但在这种情况下不起作用: http://technotes.tostaky.biz/2012/11/introduction-to-css-concepts.html 然而,下面的页面存在: www.technotes.biz/2012/11/introduction-to-css-concepts.html 我的.htaccess文件的内容是: RewriteEngine On RewriteCond %{HTTP_HOST} ^technotes\.tostaky\.biz$ [OR] RewriteCond %{HTTP_HOST} ^www\.technotes\.tostaky\.biz$ RewriteRule ^/?$ "http\:\/\/www\.mytechnotes\.biz\/" [R=301,L] 我不是系统pipe理员。 我依靠我的主机的CPanelconfiguration,但我无法解决此问题。 任何人都知道如何解决它? 谢谢!
我正在用Nginx写一些干净的URL实现的PHP CMS代码。 为了提高我的代码的安全性,我想重写我的根目录中的所有请求/使用以下types: rewrite ^(.*)$ /index.php?q=$1 last; 有了这种重写,其余的PHP脚本将无法从用户的一面访问(他们将只有,如果包括在PHP中,我是吗?)。 但是,我不想在一个位置重写请求(因为我/static/ ),因为我将只提供静态内容,如图像和CSS从该位置。 我怎样才能使这个重写不能在某些地方工作?
我想完全删除或阻止访问我的网站中的特定页面。 更具体地说,我已经看到了这个漏洞“ Joomla COM_MEDIA Exploit ”: http : //all1gat0r.blogspot.gr/2013/08/joomla-commedia-exploit.html 从我看到的,有页面: /index.php?option=com_media&view=images&tmpl=component&fieldid=&e_name=jform_articletext&asset=com_content&author=&folder= 这个漏洞对我不起作用,但无论如何我想彻底删除上面的页面 。 我怎样才能做到这一点? Web服务器: Ubuntu 14.04 LTS ( 安装Mod Security2 ) 网站: Joomla 3.1.5
如果我们假设我有一个名为machinename.ip的服务器,它将http://machinename.ipparsing为默认根目录( /var/www/html ),并通过vhosts文件www.example.comparsinghttp://www.example.com www.example.com到/var/www/html/example 有没有简单的方法来禁止访问/var/www/html/example文件夹(和任何subdirs /文件), 除了通过www.example.com虚拟主机? 即当通过添加特定的虚拟主机URL时,您可以访问它们,以便www.example.com进入/var/www/html/example但http://machinename.ip/example或任何其他组合不会带您那里或者任何一个子展位? 例如文件/var/www/html/example/myfile.php http://www.example.com/myfile.php *yay works* 但 http://machinename.ip/example/myfile.php *does not*
我在我的文档根目录中有一个文件update.php 。 但我不希望/update我的URL直接到update.php(因为我想/update与我的CMS,Drupal 7中的页面相关联) 我知道在Drupal看到Apache之前,Apache正在“处理” /update :我在我的本地开发器上创build了一个新的空文件夹test.dev,在其中放置一个名为orange.html的文件,并且我的浏览器访问了test.dev/orange显示orange.html – 所以这是configurationApache的情况 我的configuration是从puphpet.com Ubuntu12.04 PHP5.5最默认提供的设置 test.conf # ************************************ # Vhost template in module puppetlabs-apache # Managed by Puppet # ************************************ <VirtualHost *:80> ServerName test.dev ## Vhost docroot DocumentRoot "/var/www/test.dev" ## Directories, there should at least be a declaration for /var/www/test.dev <Directory "/var/www/test.dev"> Options Indexes FollowSymLinks MultiViews AllowOverride All […]
我有http://sample.cervo02.com 。 我正在尝试获取https://cervo02.com/sample 。 我试过几个redirect他们都没有工作。 rewrite ^([^.]*)$ https://cervo02.com/$1 last; 返回https://cervo02.com// 另一个是rewrite ^([^.]*).cervo02.com$ https://cervo02.com/$1 last; 返回一个404和URL不会被重写。 完整的服务器主机定义 upstream backend { server 192.167.1.79:8080; } proxy_cache_path /tmp/cache levels=1:2 keys_zone=my-test-cache:8m max_size=5000m inactive=300m; server { listen 80; server_name sample.CERVO02.com; rewrite ^([^.]*)$ https://cervo02.com/$1 last; } server { listen 443 ssl spdy; server_name CERVO02.com; ssl on; ssl_certificate /etc/nginx/ssl/server.crt; ssl_certificate_key /etc/nginx/ssl/server.key; location / […]
我正在尝试将电话号码redirect到仅在经过身份validation时可访问的SIP地址。 鉴于以下情况,SIP URI将如何(如果可能)? SIP服务器: sip.example.com validation用户: myuser authentication密码: mypass 用户要调用: targetuser 如果未经过身份validation,则调用[email protected]将不会通过。 我只能select指定一个SIP URI。
我有这个代码: <?php header('Content-Type: text/css; charset=utf-8'); ?> a.logo{background:url(//webzina.net/img/logo.png) no-repeat 100% 0} 本地(PHP版本5.3.5),我得到: a.logo{background:url(//webzina.net/img/logo.png) no-repeat 100% 0} 但是远程(PHP版本5.3.21),我得到: a.logo{background:url(http://webzina.net/img/logo.png) no-repeat 100% 0} 如果我对标题行进行评论,远程地获得与本地相同的内容。 最糟糕的是,远程我使用https,所以“http:”正在造成麻烦。 有人能告诉我哪个Apache / PHP设置搞乱协议相对的URL或为什么发生这种情况?
我使用PayPal在我的服务器上设置了第三方购物车进行付款。 当用户完成交易时,他们被redirect到https://example.com/?target=payment%255freturn&txn_id_name=txnId… 正确的URL应该包括target=payment_return或target=payment%5freturn 。 这些URL可以正常工作,向客户提供发票,但PayPalredirect到的URL是URL编码的两次,因此给客户一个404错误。 我不能改变应用程序的逻辑来接受两次转义的URL,所以我一直在尝试设置一个redirect来纠正它。 我已经尝试了以下使用mod_alias或mod_rewrite的众多变体: RedirectMatch permanent (?i)^/\?target=payment%255freturn(.*) /target=payment_return$1 RewriteRule ^/\?target=payment%255freturn(.*) /target=payment_return$1 [NE] 我已经尝试了%255f,%5f和_的变体,而且我尝试了使用和不使用NE标志。 我怎样才能让用户redirect到正确的URL?
也许这个问题有点误导,所以在这里。 在没有安装IIS或任何其他Web服务器的情况下,是否可以在Windows 7 PC上“托pipe”图像? 假设我的笔记本电脑在networking上被称为FinanceLaptop ,它基本上是将我的笔记本电脑(即\\FinanceLaptop\Image1.jpg )中的远程文件夹上的图像“转换”为http://FinanceLaptop/Image1.jpg ? 这只适用于我们的networking。 问题是将图像保存在FinanceLaptop ,而不是将图像复制到另一台服务器,然后获取指向其他服务器的URL。 这只适用于我们networking内的机器。 原因是这个networking中的一台电脑安装了wordpress。 在我们的WP安装中,我们可以上传图片,所以如果图片位置是\\FinanceLaptop\Image1.jpg那么我们只是看到post中的链接。 如果我们发布http://FinanceLaptop/Image1.jpg我们会看到该post的预览。 所以,假设我(FinanceLaptop)上传的图片不符合公司的道德准则。 我负责形象,因为它在我的机器。 谢谢。