|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
I am just having a bit of a problem and hope someone can help me. I have to sketch a scenario for you to understand.
My standard .htaccess on my site mantaseosolutions.com looks like this RewriteEngine On RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]*/)*index\.php? [NC] RewriteRule ^(([^/]*/)*)index\.php?$ http://www.mantaseosolutions.com/$1 [R=301,L] RewriteCond %{HTTP_HOST} ^mantawebsolutions.com$ [OR] RewriteCond %{HTTP_HOST} ^www.mantawebsolutions.com$ [OR] RewriteCond %{HTTP_HOST} ^mantaseosolutions.com$ RewriteRule ^(.*)$ http://www.mantaseosolutions.com/$1 [R=301,L] Redirect 301 /contactus.php http://www.mantaseosolutions.com/contactus/index.php Redirect 301 /newsroom.php http://www.mantaseosolutions.com/news/index.php ErrorDocument 404 http://www.mantaseosolutions.com This works a 100% for my site. I have now added a WordPress blog to my site under the /blog/ folder and want to redirect all my old news pages (previously under /news/ folder) to the new location on the blog. In my new /blog/ folder I am using the WordPress rewrite in a seperate .htaccess file saved in this particular folder as follow: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /blog/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /blog/index.php [L] </IfModule> I cannot figure out how to correctly set up my two .htaccess files (or combine them) to give me what i want. I want to redirect all my old posts under the /news/ folder to the new post under /blog/ but this does not happen. Example: http://www.mantaseosolutions.com/news/news.php?id=31 must redirect to http://www.mantaseosolutions.com/blo...ark-completed/ Can anyone help ? |
|
||||
|
incredible, thanks, but i don't think it's that. i am using PHP designer to do my editing, but i could just as well have used Homesite+ or Notepad. I am pretty sure there are now extra characters.
the problem is not that my .htaccess file don't work. it's a case of the one is ignoring some conditions while the other is overuling them. the .htaccess file for my site is doing what it is supposed to do. eg: http://www.mantaseosolutions.com/contactus.php does redirect to http://www.mantaseosolutions.com/contactus/index.php and http://www.mantaseosolutions.com/wrongpage/ does go to the homepage (no 404 page) but when I want to redirect http://www.mantaseosolutions.com/news/news.php?id=31 to http://www.mantaseosolutions.com/blo...ark-completed/, it also simply goes to the homepage and not to the new page in the /blog/ folder. It seems the WordPress RewriteCond tells it something different. There is perhaps something small I am missing - can't figure out what tho... |
|
||||
|
Jaan, not really, no. I think it has to do with the rewrites for the blog itself, but i cannot be sure, so what i've done was to keep the two sections seperate. One .htaccess file for my site and one .htaccess file for my blog.
So both work independantly from each other but it still does not solve my redirect issue for http://www.mantaseosolutions.com/news/news.php?id=31 that should redirect to http://www.mantaseosolutions.com/blo...ark-completed/ I will tackle this again in a few days, when I geet through all my client work... (can you believe that i just said that???) |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |