So, I had a Wordpress blog for years setup on a subdomain.
One of the articles for instance was blog.mysite.com/article1/.
The root of the server hosts a CS-Cart shopping cart (PHP). I am trying to eliminate the blog. What I did was create an article in the shopping cart software (where the root is) called "article 1", so mysite.com/article1.html (a new page) exists.
I'm trying to make it so when people go to: blog.mysite.com/article1/, it sends them to mysite.com/article1.html
This is what I have in htacess fie located in the "blog" folder (which is what the subdomain points to):
It works. I mean, it forwards anybody trying to access blog.mysite.com/article1/ to mysite.com/article1.html. The problem is, if I go into Wordpress and delete "article1", I get a 404 error. The point of moving these articles is to eventually eliminate the blog.
Shouldn't it forward, whether or not the actual page exists on the subdomain? I thought basically says if any requests for /article1 are made... send to mysite.com/article1.html.
Has anybody changed their blog to another type of software and had to move content like this?
actually your RewriteRule says to redirect to /article1.html/ on the current hostname, so i would expect it to redirect to http://blog.example.com/article1.html/ rather than http://example.com/article1.html
i would try something more like this: RewriteRule ^article1/$ http://example.com/article1.html? [R=301,L] you don't need the NE flag here and you don't want the NC flag.