1 WordPress, 2 themes, 2 domains, 2 servers

I can think of 2 approaches to try: You can use a referrer variable within the link such as: domain-two.net/blog/?ref=blog2 The receiving blog should watch out for the content of the ref variable. You can just copy domain-one.com into domain-two.net/blog, then access the database of domain-one.com remotely via wp-config.php

Rewrite rules for custom post type

You need to look at add_rewrite_tag() and add_rewrite_rule() Also read this and this topics. They are very close to you issue. After you setup rewrite rule don’t forget to flush rules add_action( ‘wp_loaded’,’my_flush_rules’ ); // flush_rules() if our rules are not yet included function my_flush_rules(){ $rules = get_option( ‘rewrite_rules’ ); $pattern = ‘news/([^/]+)?’; // the … Read more

Modifying WP URL handing code?

I ended up solving this with a little bit of code (in the form of a plugin): if(isset($_GET[‘state’]) OR isset($_GET[‘city’])) { $url = explode(“https://wordpress.stackexchange.com/”, $_SERVER[‘REQUEST_URI’]); $url = end($url); $_SERVER[‘REQUEST_URI’] = “https://wordpress.stackexchange.com/” . $url; } This code in essence removes the “/arizona/” or “/arizona/phoenix/” from the REQUEST_URI global variable and replaces it with “https://wordpress.stackexchange.com/”, which then … Read more

Why is home page content not displaying with this rewrite rule?

I suppose you’ve forgotten the QSA directive, to add properly the query string: RewriteEngine On RewriteBase / RewriteRule ^(\w+)/$ /index.php?state=$1 [QSA,L] RewriteRule ^index\.php$ – [QSA,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [QSA,L] Tell me if it works, and if not, I’ll do my best to answer. Two hints: Please try to use … Read more

What is the importance of mod_rewrite?

the Redirect directive is part of Apache’s mod_alias, not mod_rewrite. mod_rewrite enables “pretty” permalinks, ie: http://yourdomain.com/a-post-title/ rather than “ugly” permalinks ie:http://yourdomain.com/?p=99. WordPress will operate just fine without mod_rewrite and pretty permalinks, it’s just not as attractive or SEO friendly.

modify URL with mod_rewrite or hook

i fixed it using the apache proxy module: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{QUERY_STRING} !location RewriteRule ^(boston|newyork)/$ /index.php?location=$1 [NC,QSA,P] RewriteCond %{QUERY_STRING} !location RewriteRule ^(boston|newyork)/(.*)$ /$2?location=$1 [NC,QSA,P] RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> the [P] option does the trick.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)