我想在我的共享主机中禁用自定义php.ini。 我不想让我的客户使用它。 我可以使用allowverride阻止htaccess的使用,但我不能看到阻止php.ini!
我最初买了一个托pipe软件包的域名http://example.com ,并运行了一段时间的博客。 现在我已经买了一个域名http://example.com.au添加并重复的内容,但现在想写一个301redirect。 由于新域名是原始服务器的插件,它共享.htaccess文件,我实现的一般301redirect导致无限redirect循环。 什么是正确的方法来做到这一点? 我试图按照这里发布的早期post上的指示。 基本上插入这个: Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^www.example.com [NC] RewriteRule (.*) http://www.example.com.au/$1 [R=301,L]
我有一个closures的域www.example.com,但我需要将其转发到www.newwebsite.com/example/ incase有任何search引擎优化的好处。 www.newwebsite.com托pipe在LAMP堆栈虚拟服务器上,因此我可以完全访问所有内容。 www.example.com网站托pipe已经失效,所以我们需要在DNS级别进行重新命名。 我想我可以看到这样做的两种方式,并希望一些指导,请! 路线A – 重新定位example.com的alogging,然后在newwebsite.com服务器上设置一些虚拟主机。 然后在该虚拟主机内重新署名www.newwebsite.com/example/ 路线B – 使用cname进行重新定位,并使用www.newwebsite.com/的.htaccess将来自该地址的所有stream量指向www.newwebsite.com/example/。 我知道如何重新署名,但不知道在新的服务器上设置什么,所有的想法/帮助欢迎,谢谢。
我设法使用redirect永久将我的请求从端口80redirect到443。 但是,有一个问题。 在我的页面上有一个链接到/forum/ 。 当你点击链接时,它会尝试去https://futureretrogaming.comforum没有斜杠。 关于这个还能做什么? <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "/var/www/frg" ServerName www.futureretrogaming.com ServerAlias futureretrogaming.com ServerAlias futureretrogaming.net ServerAlias www.futureretrogaming.net ErrorLog "/var/www/frg/log/error.log" CustomLog "/var/www/frg/log/access.log" common <Directory /var/www/frg> DirectoryIndex index.html index.php Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> Redirect permanent / https://futureretrogaming.com/ </VirtualHost>
我有这个网站在CodeIgniter上运行,我已经安装Traq问题跟踪。 在public_html我有我的应用程序和系统目录以及一个资产目录,以及traq。 即: public_html ├── application ├── assets ├── system └── traq 当我访问http://mywebpage.com/traq时,我的页面正常工作,以及traq的第一个login屏幕。 当我访问traq中的任何其他页面,它不工作,它redirect到codeigniter,并给我404。例如,当我login它试图去http://mywebpage.com/traq/login和404失败。 这是我的.htaccess文件。 有人可以修复它,或至less指出我在正确的方向吗? <IfModule mod_rewrite.c> RewriteEngine On #RewriteBase / RewriteCond %{REQUEST_URI} ^ci_app.* RewriteRule ^(.*)$ index.php?/$1 [L] RewriteCond %{REQUEST_URI} ^traq.* RewriteRule ^traq(.*)$ traq/index.php/$1 [L] RewriteCond $1 !^(index\.php|humans\.txt|robots\.txt|assets|traq) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] </IfModule> <IfModule !mod_rewrite.c> ErrorDocument 404 /index.php […]
下面的情况是可能的,我如何将它归档到共享主机环境中? 我有一个Wordpress安装驻留在,比如说, /httpdocs/wordpress 我的网域指向这个文件夹。 所以打电话 http://example.com 导致Wordpress页面。 现在我想添加第二个系统。 但我不想污染我的Wordpress,并希望将其存储在此文件夹之外。 我仍然希望它可以通过 http://example.com/other-system 即使它驻留在文件系统中 /httpdocs/other-system 并不是 /httpdocs/wordpress/other-system 那可能吗? 我有什么意义吗? 谢谢!
是否有可能保留一个URL的某些部分,并重写其余部分? 使用.htaccess 301redirect。 在我的例子中,我想重写这种格式的url http://blog.example.com/post-name 到这一个 http://example.com/2014/post-name 到目前为止,2014年(2014年)可能是静态的,因为只有一些链接会受到影响。 谢谢!
一个apache的子目录/var/www/vhost/servername/httpdocs/subdir/ (在Ubuntu 12.04版本2.2.22)vhost webroot是它自己的一个磁盘分区。 相应的,还有/var/www/vhost/servername/httpdocs/subdir/lost+found 。 在我的apache错误日志中,我发现/var/www/vhost/servername/httpdocs/subdir/lost+found/.htaccess不能被读取的错误,像/var/www/vhost/servername/httpdocs/subdir/foo/ (例如,当该目录的FancyIndexing目录索引被显示给用户时)。 [Fri Nov 28 09:14:19 2014] [crit] [client 10.0.0.1](13)Permission denied:/var/www/vhost/servername/httpdocs/subdir/lost+found/.htaccess pcfg_openfile:无法检查htaccess文件,确保它是可读的,referer: http://servername/subdir/foo/ 我无法理解这一点。 为什么会apache尝试阅读 /var/www/vhost/servername/httpdocs/subdir/lost+found/.htaccess 在那个场合? 根据我的理解,应该只有理由尝试阅读 /var/www/vhost/servername/httpdocs/subdir/foo/.htaccess /var/www/vhost/servername/httpdocs/subdir/.htaccess /var/www/vhost/servername/httpdocs/.htaccess 有趣的是,更深的子目录(例如http://servername/subdir/foo/bar/baz/ )不会出现相应的错误消息。 是什么原因导致这个错误(或者是读取尝试的原因)? 我怎样才能摆脱它?
Curl在服务器上启用,但curl_exec函数由于安全原因被禁用。 disable_functions = exec,passthru,shell_exec,system,proc_open,popen, curl_exec,curl_multi_exec,parse_ini_file,show_source 我知道我可以从php.ini启用这个function,但会影响整个服务器。 你能帮我build议如何激活这个function(curl_exec)只为一个特定的子文件夹? 我尝试使用.htaccess但没有运气。
嗨im有问题,而在nginx中设置htaccess规则。 我的htaccess是: htaccess的规则是: RewriteEngine ON RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php/$0 [PT,L] 我已经这样转换它: if (!-f $request_filename){ set $rule_0 1$rule_0; } if (!-d $request_filename){ set $rule_0 2$rule_0; } if ($rule_0 = "21"){ rewrite /.* /index.php/$request_uri last; } 我已经读过,如果nginx是邪恶的,但我不明白这些规则。 我正在尝试设置的应用程序是: http://products.cogzidel.com/airbnb-clone/ 现在规则是很有用的,当我们尝试访问pipe理区域。 我们通过在url中写入/pipe理员来访问它,规则将这个作为index.php的input,我们login到这个。 但是在应用这个规则后,我在日志中看到错误404即将到来。 让我提到,nginx的vhost正在重新加载正确的这个规则后,我已经添加了这个规则在服务器领域和放化区也是工作