Advertisement:

Author Topic: Need correct URL rewrite instruction (.htaccess) to divert from punbb -> SMF  (Read 190 times)

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,291
  • Gender: Male
    • i30 Owners Club
I've created an SMF (2.0.13) installation in parallel to an existing punbb installation. The 2.0.13 was necessary to get the punbb convertor to work.

Individually, both work fine but now I would like to use .htaccess to ensure that all calls to http://thesite.co.uk make their way to http://thesite.co.uk/forum_smf/

I'm struggling to get this to work without receiving all manner of "unable to redirect" or "in a way that cannot complete" browser errors.

Is there a real simple method of achieving this? using .htaccess?

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,860
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
What do you have in your .htaccess so far. and do you have example punbb urls
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,291
  • Gender: Male
    • i30 Owners Club
It's a blank .htaccess currently, but I have tried

# RewriteRule ^(.*)$ http://www.thesite.co.uk/forum_smf/$1 [R,L]

- and -

# RewriteRule ^forum/(.*)$ /forum_smf/$1 [R=301,NC,L]


A typical URL would be http://www.thesite.co.uk/forum/viewforum.php?id=79

The new URL would need to be

http://www.thesite.co.uk/forum_smf/index.php?board=79.0


Actually, I'm now thinking of deleting everything not SMF-related and going for a full on replacement, as the more I look the more the current setup looks unviable.

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,860
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Do you care about matching links to the proper area like
http://www.thesite.co.uk/forum/viewforum.php?id=79
To
http://www.thesite.co.uk/forum_smf/index.php?board=79.0

Or just want to redirect the subdirectory
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,291
  • Gender: Male
    • i30 Owners Club
I've decided to trash the existing setup and superimpose the SMF install, which does have all the boards, posts and members.

The punbb installation is a right proper mess.

It's not my forum but I do have ftp and admin access. The owner is, let's just say, absent for a while so I'm doing this behind his back. That'll teach him.

Cheers for the responses.