I have a small problem. I want to change my rewrite rules for a folder to a subdomain and then redirect old rules to new ones So basically I have this: RewriteRule ^news/index([0-9-]+)\.html$ index.php?page=pressrelease_homepage&pn=$1 RewriteRule ^news/$ index.php?page=pressrelease_homepage RewriteRule ^press/([a-zA-Z0-9-]+)-([0-9-]+)\.html$ index.php?page=pressrelease_page&id=$2 Code (markup): I want to rewrite everything /news to press.domain.com and everything /press/ to press.domain.com. After I do this, I want to redirect all old links to the new subdomain links. I tried several methods but I wasn't very successful. Any ideeas?
everything /news to press.domain.com: RewriteRule ^news/$ http://press.domain.com/ Code (markup): www.domain.com/news/ will redirect to http://press.domain.com everything /press/ to press.domain.com: RewriteRule ^press/$ http://press.domain.com/ Code (markup): www.domain.com/press/ will redirect to http://press.domain.com/ redirect all /news/xxx and /press/xxx to press.domain.com/xxx RewriteRule ^news/([A-ZÂa-zÂ0-9Â-]+)/?$ http://press.domain.com/$1 [L] RewriteRule ^press/([A-ZÂa-zÂ0-9Â-]+)/?$ http://press.domain.com/$1 [L] Code (markup): I HAVENT tested. This was based on memory + referencing the mod_rewrite Cheat Sheet. If you haven't, download a copy: http://www.cheatography.com/davechild/cheat-sheets/mod-rewrite/
sorry for the late response...was off for the weekend. I tried your rules, but none of them would do anything. I also looked on the cheat sheet..but I couldn't get any help from it. I'm also a beginner and...this is all relatively new for me, that's why I need some help. Tnx again
here's the .htacess rules RewriteEngine On RewriteBase / RewriteRule ^news/index([0-9-]+)\.html$ index.php?page=pressrelease_homepage&pn=$1 RewriteRule ^news/$ index.php?page=pressrelease_homepage RewriteRule ^press/([a-zA-Z0-9-]+)-([0-9-]+)\.html$ index.php?page=pressrelease_page&id=$2 Code (markup):