URL problem: www.sitename.com/blog and www.sitename.com/learn using same WP installation

Not sure I exactly understand your problem, but it sounds like what you want to do could easily be accomplished using Custom post types: http://codex.wordpress.org/Post_Types#Custom_Types This would basically allow you to have an entire segment just for ‘learn’ completely separated from your general posts/blog – you could even give ‘learn’ it’s own styling by using … Read more

How to Force WWW. in Domain With WordPress MU Domain Mapping Plugin?

Answered from this thread. Summary: The .htaccess redirect for www/non-www… # www redirect RewriteCond %{HTTP_HOST} ^subdomain.com RewriteRule ^(.*)$ http://www.subdomain.com/$1 [R=301,L] Put it ABOVE your WordPress rules on domain.com. Should work. Example: RewriteEngine On # DOMAIN #1 – Redirect non-www urls to www RewriteCond %{HTTP_HOST} ^domain1.com RewriteRule ^(.*)$ http://www.domain1.com/$1 [R=301,L] # DOMAIN #2 – Redirect non-www … Read more

How to Detect That WP is Using Mod Rewrite or $_GET variables?

You can check for the permalink_structure option value. If this value is an empty string, WP is using the default permalink structure (/?var1=val1&var2=val2), otherwise WP will be using the pretty permalink structure (/val1/val2): if (” != get_option(‘permalink_structure’)) { // pretty permalink ‘/val1/val2’ … } else { // default permalink ‘/?var1=val1&var2=val2’ … }

Creating a folder structure

I don’t think what you want is URL rewriting. If I understand correctly, what you want is to restrict access to certain pages, posts, categories, etc., based on the current user’s role or capabilities: “If logged in, do something. If not, do something else (like prompt to login or register).” Modifying the output/behavior of a … Read more

WordPress Rewrite Rule

As the question was modified, I modify my answer. This task is relatively easy, doable just with a single rewrite rule, which converts everything after /mypage/ string into a variable – I call it var. As this is added to query_vars via hook, is reachable via global $wp_query; echo $wp_query->var;. add_filter( ‘query_vars’, ‘binda_query_vars’ ); function … Read more