.htaccess用于PHP中的静态seo URL

.htaccess用于PHP中的静态seo URL,php,.htaccess,Php,.htaccess,可能重复: 我有3个PHP文件:index1.PHP、index2.PHP和index3.PHP 假设我希望有以下SEO路径: /seo-path1/ /seo-path2/ /seo-path3/ 如何配置.htaccess文件,以便当来自这些子文件夹的请求时,它重定向到各自的PHP文件 /seo-path1/ ---> goes to index1.php /seo-path2/ ---> goes to index2.php /seo-path3/ --->

可能重复:

我有3个PHP文件:index1.PHP、index2.PHP和index3.PHP

假设我希望有以下SEO路径:

/seo-path1/

/seo-path2/

/seo-path3/
如何配置.htaccess文件,以便当来自这些子文件夹的请求时,它重定向到各自的PHP文件

/seo-path1/ ---> goes to index1.php

/seo-path2/ ---> goes to index2.php

/seo-path3/ ---> goes to index3.php
提前谢谢。 问候。
Jose.

这应该是您要找的:

RewriteEngine On
RewriteRule ^seo-path1/$ /index1.php
RewriteRule ^seo-path2/$ /index2.php
RewriteRule ^seo-path3/$ /index3.php

这应该是您正在寻找的:

RewriteEngine On
RewriteRule ^seo-path1/$ /index1.php
RewriteRule ^seo-path2/$ /index2.php
RewriteRule ^seo-path3/$ /index3.php
有关详细信息:有关详细信息: