Forum Moderators: phranque
Apache
Vbull
vbadvanced
changed directories from root to forums
simple right?
so I thought, I am losing it...
All links sitting on google for forum posts point to eg. http://www.example.com/showthread.php?t=2220
Crrently I get a 404 error due to the fact its now here http://www.example.com/forums/showthread.php?t=2220
Now without writing redirects for each indvidual thread is there an easier way? Can there not be wildcards involved?
I have tried numerous things so many I cannot name them all so I am forced to ask, any help would be greatly appreciated
[edited by: jdMorgan at 5:17 pm (utc) on Nov. 13, 2008]
[edit reason] Use example.com only, please. See TOS. [/edit]
RewriteCond %{QUERY_STRING} ^t=#*$!X$
RewriteRule ^showthread\.php$ [domain.com...] [L,R=301]
This what I have been working with if I do each individual thread. I figured I was on the correct path here but so far nothing. I was hoping not to have to do each individual thread. I have to say my lack of planning has come to bite me on this as I figured a simple redirect to a new directory would not be a problem.
RewriteEngine on
#
RewriteRule ^showthread\.php$ http://www.example.com/forums/showthread.php [R=301,L]
Options +FollowSymLinks
Jim
If you don't already have other rules in your .htaccess file, do take a look around here at the forum library and some of the recent threads. You should canonicalize your domain and URLs to prevent duplicate content problems at the least, and there are other useful code samples concerning site security.
Jim