Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
  #1  
Old 09 Jan 2008, 06:55
WritersBeat WritersBeat is offline
 
Join Date: Apr 2006
Need help with .htaccess

I'm moving my forums to a subdomain and I need to translate all current urls to forums.domain.com

RewriteRule ^(.+)\.php\?f=([0-9])$ http://forums.domain.com/forumdisplay.php?f=$2 [R=301,nc]


I tried something like that but it doesn't work
Reply With Quote
Comments
  #2  
Old 11 Jan 2008, 15:45
AWS's Avatar
AWS AWS is offline
 
Join Date: Nov 2001
Put this in .htaccess of the root directory of your site

RewriteRule ^forums/(.*) http\\forums.domain\.com$1 [NC,R=301]
Then put a .htaccess file in the subdomain root and change you rules to be something like this

RewriteRule ^(.+)\.php\?f=([0-9])$ /forumdisplay.php?f=$2 [R=301,nc]
You might have to tweak the rules, but, this does work. I migrated a site from directory to subdomain and this is working for me.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 01:05.

Layout Options | Width: Wide Color: