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
Php 动态url到静态url的更改_Php_.htaccess_Url Rewriting - Fatal编程技术网

Php 动态url到静态url的更改

Php 动态url到静态url的更改,php,.htaccess,url-rewriting,Php,.htaccess,Url Rewriting,我想改变我的动态网址静态网址搜索引擎优化请帮助我。 吹我的php代码和htaccess代码请纠正这个问题 动态url: 静态url: php代码: <?php $connect=mysql_connect("localhost","root",""); $select=mysql_select_db("test",$connect); if($_REQUEST[subject_id]!=""){ $subject_id=$_REQUEST[subject_id]; 帮我解决这个问题

我想改变我的动态网址静态网址搜索引擎优化请帮助我。 吹我的php代码和htaccess代码请纠正这个问题

动态url:

静态url:

php代码:

<?php
$connect=mysql_connect("localhost","root","");

$select=mysql_select_db("test",$connect);

if($_REQUEST[subject_id]!=""){

$subject_id=$_REQUEST[subject_id];
帮我解决这个问题。
谢谢

这个输入太有趣了,无法修复…请准确解释您的问题、错误等,以及您试图修复的内容。我需要将动态url更改为静态url。对不起,我的意思是您应该编辑问题以添加更多细节,而不是在对我的评论中,而是以其他人能够更好理解的方式。如果您只是发布代码,而没有显示您尝试了什么或希望修复它的地方,您将不会得到良好的响应。
Options +FollowSymLinks
RewriteEngine on
RewriteRule books_list/subject_id/(.*)/ books_list.php?subject_id=$1
RewriteRule books_list/subject_id/(.*) books_list.php?subject_id=$1
i have a code like this check that and change as per your requirement
# Enable mod_rewrite, start rewrite engine
Options +FollowSymLinks
RewriteEngine on
#
# Internally rewrite search engine friendly static URL to dynamic filepath and query
RewriteRule ^product/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/?$ /index.php?product=$1&color=$2&size=$3&texture=$4&maker=$5 [L]
#
# Externally redirect client requests for old dynamic URLs to equivalent new static URLs
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\?product=([^&]+)&color=([^&]+)&size=([^&]+)&texture=([^&]+)&maker=([^\ ]+)\ HTTP/
RewriteRule ^index\.php$ http://example.com/product/%1/%2/%3/%4/%5? [R=301,L]