$7.49 .com domain with free InstantPage Website Builder$1.99 Web Hosting   捷飞网络官方淘宝店   Godaddy 优惠码
返回列表 发帖
分享到:




[插件/教程] A method to use WOZ v1.5 and Ultimate SEO URLs

Open /includes/init_includes/init_woz.php  o2 c* C) g1 `: l
Please edit a red partCode:  G. j% Q% v/ D

+ ^/ g$ e  L( Z, Z5 y* u
  1. require_once(ABSPATH . 'wp-config.php');
  2. wp();

  3. if ($_GET['main_page'] == FILENAME_WORDPRESS && ( is_feed() || is_trackback() )) {
  4. gzip_compression();
  5. require_once(ABSPATH . WPINC . '/template-loader.php');
  6. exit();
  7. }
复制代码
5 e5 P2 z& h$ I

6 S# d% J5 R# x& D6 w! F3 G! @3 @) k$ ~; S1 Q" U$ k, _- f  w1 a
Open includes\classes\ssu\cores\link.php4 P3 g$ @9 @1 D  y' h
Please add a red partCode:  g* j: u2 Y/ c# W( B
+ ]  h# k( F# B7 `

6 N" @, Y6 T1 d, ?8 |
  1. // if the index.php is in the url, lets see if we need to rebuild the path and redirect.
  2. if((strpos($this->original_uri, 'index.php') !== false)){
  3. if(!isset($_GET['main_page']) || empty($_GET['main_page'])){
  4. $_GET['main_page'] = 'index';
  5. $this->original_uri = $this->original_uri. '&main_page=index';
  6. }
  7. if($this->checkPageExcludedList($_GET['main_page']))
  8. return false;
  9. $this->redirect_type = 2;
  10. return false;
  11. }

  12. // for WordPress On ZenCart BOF
  13. else if($_GET['main_page'] == FILENAME_WORDPRESS){ return false; }
  14. // for WordPress On ZenCart EOF

  15. // if we are using multi-lang, then we should have language code at the very beginning
  16. if(SSUConfig::registry('configs', 'multilang_status')){
  17. $languages_code = substr($this->original_uri, 0, 2);
  18. if(!array_key_exists($languages_code, SSUConfig::registry('languages')))
  19. $this->redirect_type = 1;
  20. else{
  21. $_get['language'] = $languages_code;
  22. $this->original_uri = trim(substr($this->original_uri, 2), '/');
  23. }
  24. }
复制代码
, U: d  e: k( N4 i
9 `1 {& `( k2 Z0 a+ m
$ e+ D# i9 u# e( N4 Y, l3 O( h
you’ll need to set the Ultimate SEO URL rewrite rules to ignore direct client requests for the /blog folder by using an additional RewriteCond.
) w- r" b/ D& ~  s' O0 d* t( ?eg)Code:
4 b" E( a6 P0 R" w. Z, q& {: {: D1 g2 m3 R/ v. ^
# w+ A3 K  U1 G( T% ?( `
  1. # Donâ?™t rewrite blog directory
  2. RewriteCond %{REQUEST_URI} !^/blog.* [NC]
  3. RewriteCond %{REQUEST_URI} !^/wordpress.* [NC]

  4. # Handle all other URIs using Zen Cart (index.php)
  5. RewriteRule (.*) /index.php?%{QUERY_STRING} [L]

  6. # Do rewrite blog directory
  7. RewriteRule ^blog(.*)$ /index.php?main_page=wordpress&$1 [E=VAR1:$1,QSA,L]
复制代码

+ W& v2 f0 u; G: e
: m  n4 K5 X: [( S重写规则,不同的服务器.大家自己看着改..# r1 D4 G: a; z. i

, W% k- d5 ~7 |: u2 u) jhttp://www.s-page.net/en/2010/04/22/a-method-to-use-woz-v1-5-and-ultimate-seo-urls/




返回列表
Namecheap
Namecheap.com - Cheap domain name registration, renewal and transfers - Free SSL Certificates - Web Hosting
互联网安全