Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/259.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php .htaccess的子域错误_Php_.htaccess - Fatal编程技术网

Php .htaccess的子域错误

Php .htaccess的子域错误,php,.htaccess,Php,.htaccess,我上传了一个.htacess文件来隐藏我网页的文件扩展名-在我使用我的一个子域之前,一切都很美好。。。get.my-website.com-我有404页。 当我把get.mywebsite.com/index.php 这是我的.htaccess文件中的内容 RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L] 谢谢你是说你创建了一个子域并将这个.htaccess文件添加

我上传了一个.htacess文件来隐藏我网页的文件扩展名-在我使用我的一个子域之前,一切都很美好。。。get.my-website.com-我有404页。 当我把get.mywebsite.com/index.php

这是我的.htaccess文件中的内容

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]

谢谢

你是说你创建了一个子域并将这个
.htaccess
文件添加到该子域的文档根目录中?我创建了一个.htaccess文件并将其添加到public\u html文件夹中…你的子域是否指向该
public\u html
文件夹?你的评论给了我一个想法…我将.htaccess文件上载到了子域文件夹,它现在可以工作了…谢谢。这正是它应该工作的方式。;)很高兴你找到了答案。你是说你创建了一个子域并将这个
.htaccess
文件添加到了该子域的文档根目录中?我创建了一个.htaccess文件并将其添加到了public\u html文件夹中…你的子域是否指向了该
public\u html
文件夹?你的评论给了我一个想法…我上传了.htaccess文件到子域文件夹,现在就可以工作了…谢谢。这正是它应该工作的方式。;)很高兴你明白了。