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-specific迁移_Php_.htaccess - Fatal编程技术网

Php .htaccess-specific迁移

Php .htaccess-specific迁移,php,.htaccess,Php,.htaccess,我在.htaccess上遇到了麻烦,我知道也有类似的帖子,但即使有了它们,我也无法理解 我需要我的网页重新定位从url像用户 website.net/photos?action=something 到 website.net/?fotky=something 感谢您的支持,请尝试将以下内容添加到站点根目录中的.htaccess文件中 RewriteEngine on RewriteBase / RewriteCond %{QUERY_STRING} (^|&)action=([^&am

我在.htaccess上遇到了麻烦,我知道也有类似的帖子,但即使有了它们,我也无法理解

我需要我的网页重新定位从url像用户 website.net/photos?action=something 到 website.net/?fotky=something


感谢您的支持,请尝试将以下内容添加到站点根目录中的
.htaccess
文件中

RewriteEngine on
RewriteBase /

RewriteCond %{QUERY_STRING} (^|&)action=([^&]+)(&|$) [NC] 
RewriteRule ^photos$  ?fotky=%2 [NC,L,R=301]

whole.htaccess如下所示:
Header set Access Control Allow Origin“*”RewriteEngine on RewriteBase/RewriteCond%{QUERY|STRING}(^&&)action=([^&]+)(&&&&$)[NC]rewriterule^photos$?fotky=%2[L,R=301]
尝试在前面添加
选项+FollowSymLinks
that@UlrichPalha谢谢,现在可以工作了。不需要yoavmatchulsky,但谢谢你的努力。