Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Aiheen aloitti: Shambles - lokakuu 23, 2019, 04:49:03 IP

Otsikko: Need correct URL rewrite instruction (.htaccess) to divert from punbb -> SMF
Kirjoitti: Shambles - lokakuu 23, 2019, 04:49:03 IP
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?
Otsikko: Re: Need correct URL rewrite instruction (.htaccess) to divert from punbb -> SMF
Kirjoitti: vbgamer45 - lokakuu 23, 2019, 05:04:29 IP
What do you have in your .htaccess so far. and do you have example punbb urls
Otsikko: Re: Need correct URL rewrite instruction (.htaccess) to divert from punbb -> SMF
Kirjoitti: Shambles - lokakuu 23, 2019, 05:19:35 IP
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.
Otsikko: Re: Need correct URL rewrite instruction (.htaccess) to divert from punbb -> SMF
Kirjoitti: vbgamer45 - lokakuu 23, 2019, 05:31:33 IP
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
Otsikko: Re: Need correct URL rewrite instruction (.htaccess) to divert from punbb -> SMF
Kirjoitti: Shambles - lokakuu 23, 2019, 05:40:22 IP
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.