Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.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
.htaccess下划线表示在我的web服务器中不起作用的连字符_.htaccess - Fatal编程技术网

.htaccess下划线表示在我的web服务器中不起作用的连字符

.htaccess下划线表示在我的web服务器中不起作用的连字符,.htaccess,.htaccess,我看过很多关于我的案例的示例/教程,但当我使用它们的工作代码时,它们对我的URL没有任何作用 我想将这个链接example/lmp/property/jumeirah\u parklaval\u legacy\u 4brms/V0004221/链接到example/lmp/property/jumeirah-parklaval-legacy-4brms/V0004221/ 我还测试了中的.htaccess代码,它为我提供了正确的输出URL,但在本地服务器上测试时,它不会将我重定向到输出URL 这

我看过很多关于我的案例的示例/教程,但当我使用它们的工作代码时,它们对我的URL没有任何作用

我想将这个链接example/lmp/property/jumeirah\u parklaval\u legacy\u 4brms/V0004221/链接到example/lmp/property/jumeirah-parklaval-legacy-4brms/V0004221/

我还测试了中的.htaccess代码,它为我提供了正确的输出URL,但在本地服务器上测试时,它不会将我重定向到输出URL

这是我的密码

<IfModule mod_rewrite.c>
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /lmp


    RewriteRule ^lmp/property([^_]*)_([^_]*)_([^_]*)_([^_]*)_([^_]*)_([^_]*)_(.*)$ lmp/property$1-$2-$3-$4-$5-$6-$7 [L,NC,E=underscores:Yes]
    RewriteRule ^lmp/property([^_]*)_([^_]*)_([^_]*)_([^_]*)_([^_]*)_(.*)$ lmp/property$1-$2-$3-$4-$5-$6 [L,NC,E=underscores:Yes]
    RewriteRule ^lmp/property([^_]*)_([^_]*)_([^_]*)_([^_]*)_(.*)$ lmp/property$1-$2-$3-$4-$5 [L,NC,E=underscores:Yes]
    RewriteRule ^lmp/property([^_]*)_([^_]*)_([^_]*)_(.*)$ lmp/property$1-$2-$3-$4 [L,NC,E=underscores:Yes]
    RewriteRule ^lmp/property([^_]*)_([^_]*)_(.*)$ lmp/property$1-$2-$3 [L,NC,E=underscores:Yes]
    RewriteRule ^lmp/property([^_]*)_(.*)$ lmp/property$1-$2 [L,NC,E=underscores:Yes]

    RewriteCond %{ENV:REDIRECT_underscores} ^Yes$
    RewriteRule ^([^_]+)$ lmp/$1 [R,L]



    RewriteCond %{REQUEST_URI} ^../system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    #When your application folder isn't in the system folder
    #This snippet prevents user access to the application folder
    #Submitted by: Fabdrol
    #Rename 'application' to your applications folder name.

    RewriteCond %{REQUEST_URI} ^../application.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn't true it sends the
    #request to index.php

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]

    RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s(.*)/index.php/?([^\ \?]*) [NC]
    RewriteRule ^ %1/%2 [R=301,L]

</IfModule>
<IfModule !mod_rewrite.c>

    ErrorDocument 404 /home
</IfModule>

选项+FollowSymlinks
重新启动发动机
重写基/lmp
重写规则^lmp/property([^]*)lmp/property$1-$2-$3-$4-$5-$6-$7[L,NC,E=下划线:是]
重写规则^lmp/property([^]*)([^]*)([^]*)([^]*)(.*)$lmp/property$1-$2-$3-$4-$5-$6[L,NC,E=下划线:是]
重写规则^lmp/property([^]*)([^]*)([^]*)([^]*)(.*)$lmp/property$1-$2-$3-$4-$5[L,NC,E=下划线:是]
重写规则^lmp/property([^]*)([^]*)([^]*)(.*)$lmp/property$1-$2-$3-$4[L,NC,E=下划线:是]
重写规则^lmp/property([^]*)([^]*)(.*)$lmp/property$1-$2-$3[L,NC,E=下划线:是]
重写规则^lmp/property([^]*)(.*)$lmp/property$1-$2[L,NC,E=下划线:是]
RewriteCond%{ENV:REDIRECT_下划线}^是$
重写规则^([^]+)$lmp/$1[R,L]
重写cond%{REQUEST_URI}^../system*
重写规则^(.*)$/index.php?/$1[L]
#当应用程序文件夹不在系统文件夹中时
#此代码段阻止用户访问应用程序文件夹
#提交人:Fabdrol
#将“应用程序”重命名为应用程序文件夹名称。
重写cond%{REQUEST_URI}^../application*
重写规则^(.*)$/index.php?/$1[L]
#检查用户是否试图访问有效文件,
#例如图像或css文档,如果这不是真的,它会发送
#请求index.php
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则^(.*)$index.php?/$1[L]
RewriteCond%{THE_REQUEST}^[A-Z]{3,}\s(.*)/index.php/?([^\\?]*)[NC]
重写规则^%1/%2[R=301,L]
错误文档404/主页
您可以使用:

<IfModule mod_rewrite.c>
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /lmp/

    # recursive rule to replace _ by - from REQUEST_URI
    RewriteRule ^(property)/([^_]*)_+([^_]*_.*)$ $1/$2-$3 [L,NC]
    RewriteRule ^(property)/([^_]*)_([^_]*)$ $1/$2-$3 [L,R=302,NC,NE]

    RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s(.*)/index.php/?([^\ \?]*) [NC]
    RewriteRule ^ %1/%2 [R=301,L]

    RewriteCond %{REQUEST_URI} ^../system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    #When your application folder isn't in the system folder
    #This snippet prevents user access to the application folder
    #Submitted by: Fabdrol
    #Rename 'application' to your applications folder name.

    RewriteCond %{REQUEST_URI} ^../application.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn't true it sends the
    #request to index.php

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]

</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 /home
</IfModule>

选项+FollowSymlinks
重新启动发动机
重写基/lmp/
#用请求URI替换u的递归规则
重写规则^(属性)/([^]*)+([^]*.*)$$1/$2-$3[L,NC]
重写规则^(属性)/([^]*)([^]*)$$1/$2-$3[L,R=302,北卡罗来纳州,北卡罗来纳州]
RewriteCond%{THE_REQUEST}^[A-Z]{3,}\s(.*)/index.php/?([^\\?]*)[NC]
重写规则^%1/%2[R=301,L]
重写cond%{REQUEST_URI}^../system*
重写规则^(.*)$/index.php?/$1[L]
#当应用程序文件夹不在系统文件夹中时
#此代码段阻止用户访问应用程序文件夹
#提交人:Fabdrol
#将“应用程序”重命名为应用程序文件夹名称。
重写cond%{REQUEST_URI}^../application*
重写规则^(.*)$/index.php?/$1[L]
#检查用户是否试图访问有效文件,
#例如图像或css文档,如果这不是真的,它会发送
#请求index.php
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则^(.*)$index.php?/$1[L]
错误文档404/主页