Redirects

DK…I don’t know. I thought I was being specific from the beginning and thought I was just saying the same thing over and over but apparently not. I’ll try what you have and won’t bug you again b/c I seem to just be confusing things. Thanks so much.

Sculley,

Hmmm, not bugging me. Just the specifications need to be pretty precise to know what to do.

The original code I posted should work (when applied to the categories, as I understand your requirements) and the latest should work on redirecting to the DocumentRoot’s DirectoryIndex.

If those are not what is required, please reword your “specification” so I know where I’ve gone wrong.

Regards,

DK

That is where I am confused. I thought I was being really clear on the specs this whole time. All /static pages go to the homepage and all posts (news stories) go to the blog page. The code I was giving was just what I read on Geeklog. They said that:

all news stories have the url …/article.php/**
all static pages have the url …/staticpages/index.php?page=** (or with url_rewrite: …/staticpages/index.php/**)

**= story id/slug, page slug/id

I don’t understand what isn’t clear? Need to redirect all static pages to http://www.subtleyoga.com and all blog posts/news stories to blog page (http://www.subtleyoga.com/category/blogging-towards-bliss/).

Sculley,

Okay, based on your last post:

RewriteEngine on
RewriteRule ^staticpages/ http://www.subtleyoga.com/ [[COLOR="Red"]R=301,[/COLOR]L]

RewriteRule ^article\\.php/([-a-zA-Z]+)$ http://www.subtleyoga.com/category/$1 [R=301,L]

# remainder of your mod_rewrite code

As above, the remainder of your mod_rewrite code will come from your CMS and should take your “slug” and serve the correct page from that.

Regards,

DK

And I put this above the WP code after I remove the <IfModule mod_rewrite.c></IfModule> tags?

Like so:

## php_flag register_globals off
Options +FollowSymlinks

DirectoryIndex index.php index.html
ErrorDocument 404 /404.php

## php_value post_max_size "20M"
## php_value upload_max_filesize "20M"
## php_value max_input_time "120"
##php_value include_path /home/content/s/u/b/subtleyoga/lib/geeklog/ACTIVE-geeklog-1.5.0/system/pear

RewriteEngine on
RewriteRule ^staticpages/ http://www.subtleyoga.com/ [L]
RewriteRule ^article\\.php/([-a-zA-Z]+)$ http://www.subtleyoga.com/category/$1 [R=301,L]

# remainder of your mod_rewrite code

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteCond &#37;{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

Sculley,

You don’t need the RewriteEngine on twice (unless you’ve used a RewriteEngine off between them).

Regards,

DK

DK, I don’t know how to thank you. I will start reading the tutorials you sent and will hopefully learn this!

:Partier:

Learn then help others learn … pass it along!

Regards,

DK

DK,

This code is redirecting all the pages with “staticpages” in the URL to go to the homepage right? I just tested an old page: http://www.subtleyoga.com/staticpages/index.php?page=asheville-yoga-teacher-training and it’s trying to go to: http://www.subtleyoga.com/staticpages/?page=asheville-yoga-teacher-training not the homepage (subtleyoga.com).

It’s not working?

Sculley,

Add the R=301 flag as shown above.

Regards,

DK

I think it’s on there. This what I uploaded:

RewriteEngine on
RewriteRule ^staticpages/ http://www.subtleyoga.com/ [[B][COLOR="Red"]R=301,[/COLOR][/B]L]
RewriteRule ^article\\.php/([-a-zA-Z]+)$ http://www.subtleyoga.com/category/$1 [R=301,L]

# remainder of your mod_rewrite code