的.htaccess重新写插入&QUOT传入的请求;?/负载="之后域名负载、域名、htaccess、QUOT

由网友(生来平胸不怕狼)分享简介:我需要一些帮助编码改写导入链接,这正是我需要的:I am in need of some help with coding to rewrite incoming links, this is what I need:传入的请求 http://mysite.com/whatever 重写要求 http://m...

我需要一些帮助编码改写导入链接,这正是我需要的:

I am in need of some help with coding to rewrite incoming links, this is what I need:

传入的请求 http://mysite.com/whatever

重写

要求 http://mysite.com/?load=/whatever

所以简而言之导入链接需要通过添加修正/?负荷=立即域名之后。

so in a nutshell the incoming links need correcting by adding "/?load=" immediately after the domain name.

这些变化都需要进行更改,以我的网站导航后

The changes are required after making changes to my sites navigation

任何帮助非常AP preciated:)

Any help much appreciated :)

推荐答案

将这条规则:

RewriteEngine On

# external redirect from actual URL to pretty one
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+?load=([^s&]+) [NC]
RewriteRule ^ /%1? [R=301,L]

# internal forward from pretty URL to actual one
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /?load=/$1 [L,QSA]
阅读全文

相关推荐

最新文章