English 中文(简体)
Rewrite problems, Wordpress permalink
原标题:Rewrite problems, Wordpress permalink

在我的一个网站,一米使用轮.——以字标的店铺面粉,这在文字上是商业的。

如果使用友好的URL,则在以下链接中:

www.mysite.com/store/product_info/products_id/1234

Where store is the rewrite of one page of wordpress (pagename=store) or (page_id=1) product_info is related to product_info.php of oscommerce.

主要问题是,这种联系并不存在,字句不承认这种联系,并寄给:

www.mysite.com

So商改 ,但不承认,正确的ur是:

http://www.mysite.com/store?slug=product_info.php&products_id=1234
http://www.mysite.com/index.php?pagename=store&slug=product_info.php&products_id=1234
http://www.mysite.com/index.php?page_id=1&slug=product_info.php&products_id=1309

我需要把头盔送到其中一人,但保持反应和使用头一种陶器,这样就必须在内部进行,

某些方向是ice,

感谢。

问题回答
function add_mypage_var($public_query_vars) {
$public_query_vars[] =  slug ;
$public_query_vars[] =  cPath ;
$public_query_vars[] =  products_id ;
$public_query_vars[] =  manufacters_id ;
$public_query_vars[] =  sort ;
$public_query_vars[] =  action ;
$public_query_vars[] =  page ;
$public_query_vars[] =  guest ;
$public_query_vars[] =  keywords ;


return $public_query_vars;
}

//add a rewrite rules to "Page that links to Store in my case (loja)"
function do_rewrite_mypage() {
add_rewrite_rule( loja/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)?$ ,  index.php/loja/?slug=$1.php&$2=$3&$4=$5&$6=$7&$8=$9 , top );
add_rewrite_rule( loja/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)?$ ,  index.php/loja/?slug=$1.php&$2=$3&$4=$5&$6=$7 , top );
add_rewrite_rule( loja/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)?$ ,  index.php/loja/?slug=$1.php&$2=$3&$4=$5 , top );
add_rewrite_rule( loja/([^/]+)/([^/]+)/([^/]+)?$ ,  index.php/loja/?slug=$1.php&$2=$3 , top );
add_rewrite_rule( loja/([^/]+)/?$ ,  index.php/loja/?slug=$1.php , top );
}

add_filter( query_vars ,  add_mypage_var );
add_action( init ,  do_rewrite_mypage );




相关问题
URL rewrite in IIS6 - Third party tools

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 ...

Rewrite spring-security redirect URLs

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 ...

ASP.NET Friendly URLs

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 ...

Could I get by HttpModule the URL that contains * before?

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 *...

Domains & Foreward Slash

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....

URL Mod-Rewrite

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 ...

热门标签