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
Apache 将动态URL转换为静态URL时出现问题_Apache_.htaccess_Mod Rewrite_Url Rewriting_Friendly Url - Fatal编程技术网

Apache 将动态URL转换为静态URL时出现问题

Apache 将动态URL转换为静态URL时出现问题,apache,.htaccess,mod-rewrite,url-rewriting,friendly-url,Apache,.htaccess,Mod Rewrite,Url Rewriting,Friendly Url,我无法将网站的动态URL转换为静态URL。我的托管计划是通过bluehost共享的,我遵循了他们的文档,但没有成功。附加链接: 我已经在.htaccess中输入了以下内容,但每次访问相关页面时都不会发生任何事情。代码如下: 选项+symlinksFownerMatch 重新启动引擎 RewriteBase/ RewriteRule-Victorian Gondoliers Boat Hook-(.*)-product-details\u id-(.*)\.html$product-detail

我无法将网站的动态URL转换为静态URL。我的托管计划是通过bluehost共享的,我遵循了他们的文档,但没有成功。附加链接:

我已经在.htaccess中输入了以下内容,但每次访问相关页面时都不会发生任何事情。代码如下:

选项+symlinksFownerMatch

重新启动引擎

RewriteBase/

RewriteRule-Victorian Gondoliers Boat Hook-(.*)-product-details\u id-(.*)\.html$product-details?Victorian Gondoliers Boat Hook=$1&product-details\u id=$2


更确切地说,我想将上述url转换为:

我的产品详细信息页面是一个page-product-details.php动态文件,它依赖GET语句来呼应独特的产品详细信息

这是一个用户权限问题,因为托管计划是共享的还是我输入的内容不正确


您诚挚的,Gregory。

在您展示的样本和尝试中,请尝试以下规则文件。请在测试URL之前清除浏览器缓存

Options +SymLinksIfOwnerMatch
RewriteEngine ON
RewriteBase /
RewriteCond %{THE_REQUEST} \s/([\w-]+)\?([^&]*)&details_id=\d+\s [NC]
RewriteRule ^ /%1/%2?  [R=301,NC,L]

RewriteRule ^([\w-]+)/([\w-]+)/?$ $1.php?$2&$1_id=1000001087 [QSA,NC,L]

请您用示例URL说明您想从哪个URL重写或重定向到哪个URL,好吗?请在您的问题中发布详细信息,以澄清问题,谢谢。嗨,Ravinder,谢谢您的正确回答。刚刚编辑了上面的内容。感谢您的编辑,您的系统中是否有名为
产品详细信息
的文件?