Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/262.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在php中不工作?_Php - Fatal编程技术网

在服务器上获取错误消息时,.htaccess在php中不工作?

在服务器上获取错误消息时,.htaccess在php中不工作?,php,Php,我的(.htaccess)在URL中工作不正常。我试图在网上浏览这些文章,但没有任何文章能够解决这个问题,请帮助我解决我在(.htaccess)上遇到的这个问题 我检查了几次我的代码,但未能找到此问题的正确问题 (.htaccess)之前的URL:localhost/worldsindia/shop/home.php?company=timefreefor 所需URL:localhost/worldsindia/catalog/timefreefor 这是我的.htaccess代码 Rewrit

我的(.htaccess)在URL中工作不正常。我试图在网上浏览这些文章,但没有任何文章能够解决这个问题,请帮助我解决我在(.htaccess)上遇到的这个问题

我检查了几次我的代码,但未能找到此问题的正确问题

(.htaccess)之前的URL:localhost/worldsindia/shop/home.php?company=timefreefor

所需URL:localhost/worldsindia/catalog/timefreefor

这是我的.htaccess代码

RewriteEngine On

<ifModule mod_headers.c>
Header set Connection keep-alive 
</ifModule>
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>
## EXPIRES CACHING ##
#AddOutputFilterByType DEFLATE text/plain
#AddOutputFilterByType DEFLATE text/html
#AddOutputFilterByType DEFLATE text/xml
#AddOutputFilterByType DEFLATE text/css
#AddOutputFilterByType DEFLATE application/xml
#AddOutputFilterByType DEFLATE application/xhtml+xml
#AddOutputFilterByType DEFLATE application/rss+xml
#AddOutputFilterByType DEFLATE application/javascript
#AddOutputFilterByType DEFLATE application/x-javascript

RewriteCond %{REQUEST_FILENAME} !-f


RewriteRule ^([^\.]+)/?$ $0.php [NC,L]
RewriteRule ^catalog/([A-Za-z0-9-]+)/?$    shop/home.php?company=$1 [NC,L]
重新编写引擎打开
标题集连接保持活动状态
##过期缓存##
过期于
过期按类型映像/jpg“访问1年”
过期按类型图像/jpeg“访问1年”
ExpiresByType image/gif“访问1年”
过期按类型图像/png“访问1年”
ExpiresByType文本/css“访问1个月”
ExpiresByType text/html“访问1个月”
过期按类型应用程序/pdf“访问1个月”
ExpiresByType文本/x-javascript“访问1个月”
过期按类型应用程序/x-shockwave-flash“访问1个月”
过期按类型图像/x图标“访问1年”
ExpiresDefault“访问1个月”
##过期缓存##
#AddOutputFilterByType泄气文本/普通
#AddOutputFilterByType DEFLATE text/html
#AddOutputFilterByType DEFLATE text/xml
#AddOutputFilterByType DEFLATE text/css
#AddOutputFilterByType DEFLATE应用程序/xml
#AddOutputFilterByType DEFLATE应用程序/xhtml+xml
#AddOutputFilterByType DEFLATE应用程序/rss+xml
#AddOutputFilterByType DEFLATE应用程序/javascript
#AddOutputFilterByType DEFLATE应用程序/x-javascript
重写cond%{REQUEST_FILENAME}-F
重写规则^([^\.]+)/?$$0.php[NC,L]
重写规则^catalog/([A-Za-z0-9-]+)/?$shop/home.php?公司=$1[NC,L]
所需URL:localhost/worldsindia/catalog/timefreefor

当我尝试使用上面的url时,我得到了错误


在服务器上找不到请求的URL

请提供解决方案…….请提供解决方案。。。。。。。。。。