考虑
www.example.com/paper-ads-details.php?req=43397&rnd=1308546000
我想把这个标题改为:
www.example.com/jobs-in-chanai.php
where req=43397
is pointing to the post titled as jobs in chanai
How may i rewrite that? Please help me.
考虑
www.example.com/paper-ads-details.php?req=43397&rnd=1308546000
我想把这个标题改为:
www.example.com/jobs-in-chanai.php
where req=43397
is pointing to the post titled as jobs in chanai
How may i rewrite that? Please help me.
After hard time i got the way, and now sharing it for Other users...
Suppose the required Url is www.example.com/programmer-Jobs-in-luton
The Rule will be like...
RewriteRule ^([a-zA-Z0-9-]+)$ job-details.php?slug=$1 [L]
If you want to use .htaccess, you need to write a script to generate the rewrite rules statically, so the .htaccess file contains lines like
RewriteRule ^jobs-in-chanai.php /paper-ads-details.php?req=43397&rnds=1308546000 [L]
在项目组合中处理申请开始时的路线。 Parse(和过滤) url,根据lu,而不是 re和 r参数检查该员额。 必要时取得结果。
在您的数据库中,您需要一个专栏,用于上述清洁尿液或lu光规则。
我利用这一职能(而不是我的代码):
function makeSlug($string, $force_lowercase = true, $anal = false) {
$strip = array("~", "`", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "=", "+", "[", "{", "]",
"}", "\", "|", ";", ":", """, " ", "‘", "’", "“", "”", "–", "—",
"—", "–", ",", "<", ".", ">", "/", "?");
$clean = trim(str_replace($strip, "", strip_tags($string)));
$clean = preg_replace( /s+/ , "-", $clean);
$clean = ($anal) ? preg_replace("/[^a-zA-Z0-9]/", "", $clean) : $clean ;
return ($force_lowercase) ?
(function_exists( mb_strtolower )) ?
mb_strtolower($clean, UTF-8 ) :
strtolower($clean) :
$clean;
}
我在一栏中拯救了这一点,并做了如下一些事情:
"SELECT * FROM `content` WHERE `clean_url` = " . mysql_real_escape_string($cleanURL) . " ";
I have collected the following api/sdk/whatever which provide modules for doing url rewriting in IIS 5/6/7. Some are free-open source and some require $. I haven t tried any of them. I would like to ...
I m trying to get Tuckey UrlRewriteFilter to tidy up URLs for my webapp. One problem I ve got is that when spring-security notices that an anonymous user is trying to access a protected resource it ...
We have a URLRewriting module that is using a Response.Redirect in the BeginRequest event method to change the destination page. Would it be better to use Server.Transfer or Server.TransferRequest ...
In my research, I found 2 ways to do them. Both required modifications to the Application_BeginRequest procedure in the Global.Asax, where you would run your code to do the actual URL mapping (mine ...
因此,我有这一样本:
My web-site is working under ASP.NET 3.5, IIS7, Integrated pipiline mode. My HttpModule is getting request to all resources, including URLs like this: http://my-site.com/address And I would support *...
This is rather difficult to explain so please bear with me. We will be hosting 4 websites on our server and the plan is to have each site sit under its own domain: site-a.com site-b.com sub1.site-b....
I currently have a working URL: http://example.com/security-services.php?service=fixed-camera-surveillance and then I have PHP say, $_REQUEST[ service ] to do some stuff... But I d like to ...