0

I have this code in my htaccess file for showing a company profile:

RewriteRule ([a-zA-Z0-9_+-]+)\/home\ view_details.php

And this code is working fine with this url

http://www.example.com/zoom-international-fcz-/home.html

Now I need to rewrite with this URL, not need to add home.html, and zoom-international-fcz is not a static string, it's coming dynamically....

http://www.example.com/zoom-international-fcz/
4

1 回答 1

2

动态重写规则示例

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^files/([^/]+)/([^/]+).zip /download.php?section=$1&file=$2 [NC]

将允许您将此链接显示为..

http://site.pl/files/games/file.zip

() 中的两个正则表达式被放入 $1 和 $2 中,这些参数在 download.php 站点上的$_GET变量中可用。

于 2013-05-06T11:14:49.720 回答