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

How can I allow trailing slashes on some URLs without a redirect, but not on others?

Use flush_rewrite_rules(): add_action( ‘init’, ‘my_rewrite_func’ ); function my_rewrite_func() { add_rewrite_rule( ‘post4/$’, ‘index.php?p=12’, ‘top’ ); flush_rewrite_rules(); } and / or whichever rewrite rules you use, you could always use /? for optional trailing slashes or force the trailing slash if you would prefer for it to always be there.

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.

WP-e-commerce (getshopped) – Annoying permalink issue [closed]

Apologies, I find this a little bit a non-issue as it states clearly everywhere that WPML works 100% when you use a permalinks structure of day and name (http://domain.com/2012/02/07/sample-post/). If this is something you cannot accept, then you’s better come to terms with the fact that WPML most likely is not going to work 100% … Read more

custom url – add attachment’s id or name after post

Showing links to attachments in the desired format Loop through the attachments and generate the link you want: $args = array( ‘post_type’ => ‘attachment’, ‘numberposts’ => null, ‘post_status’ => null, ‘post_parent’ => $post->ID ); $attachments = get_posts($args); if ($attachments) { foreach ($attachments as $attachment) { echo ‘<a href=”‘ . get_permalink() . ‘video/’ . $attachment->ID . … Read more