Forum Moderators: phranque
I had a wiki at the address www.site.com/wiki/
As part of a mini re layout I moved the wiki to wiki.site.com (and cpanel uses the folder wiki in the file system)
I am trying to redirect links from the old folder wiki to the new subdomain one. A simple redirect I can do, but when trying to redirect a link like this is were I hit the brick wall
www.site.com/wiki/index.php/widget
Ive spent the good part of today trying to solve this, mainly by seearching forums and google to no joy, any help?
Jon
--
RewriteEngine on
RewriteRule ^(images¦skins)/ - [L]
RewriteRule .*\.php$ - [L]
RewriteRule ^/?(.*)$ /index.php?title=$1 [L,QSA]
--
The only solution I got to half work was by placing the following code in my main folder (since the old link was site.com/wiki/index.php/widget)
--
RedirectMatch permanent ^/wiki/$ http://wiki.site.com
--
[edited by: JonSimmonds at 6:10 pm (utc) on Mar. 10, 2006]
[edited by: jdMorgan at 9:21 pm (utc) on Mar. 10, 2006]
[edit reason] De-linked [/edit]
RewriteEngine on
#
# Rewrite wiki folder requests to wiki subdomain
RewriteRule ^wiki(.*)$ http://wiki.example.com$1 [R=301,L]
#
# Else rewrite all requests except for /images, /skins and php files to index.php script
RewriteCond $1!^(images¦skins)/¦\.php$
RewriteRule (.*) /index.php?title=$1 [QSA,L]