Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! 2.6/7 » Questions about Stars! AutoHost » mod_rewrite sahforum to sahforum2
mod_rewrite sahforum to sahforum2 Fri, 03 May 2013 16:41 Go to next message
Altruist is currently offline Altruist

 
Commander

Messages: 1068
Registered: August 2005
Location: Berlin
With the new forum the URL changes from
* http://starsautohost.org/sahforum/...
to
* http://starsautohost.org/sahforum2/...

And it looks like it will stay this way (for ever or still a while).

Unfortunately this breaks all old links to forum posts. The old hands will just add the "2" to the old URL but new users will go amiss.

A way to solve this would be to redirect all old URLs to the new place. This should be rather easily done in the .htaccess file with "mod_rewrite". Well, somehow "easily" because while I know it can be done easily, I nevertheless would need to dive into the exact how-to first. But I am sure that we have enough people here who can write the code line(s) within 5min.

@Ron, wouldn't that be an intersting solution?

Can anybody spell out the code line which needs to be added to the htaccess file?

Report message to a moderator

Re: mod_rewrite sahforum to sahforum2 Thu, 25 July 2013 07:12 Go to previous messageGo to next message
XyliGUN is currently offline XyliGUN

 
Ensign
Stars! V.I.P


Messages: 325
Registered: July 2004
Location: Russia, St.Petersburg

Is this new address (i.e. sahforum2) is permanent or just a temporary upgrade solution?



"Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something."
Robert A. Heinlein, Time Enough For Love

Report message to a moderator

Re: mod_rewrite sahforum to sahforum2 Thu, 25 July 2013 22:32 Go to previous messageGo to next message
Ron is currently offline Ron

 
Commander
Forum Administrator
Stars! AutoHost Administrator

Messages: 1231
Registered: October 2002
Location: Collegedale, TN
XyliGUN wrote on Thu, 25 July 2013 07:12
Is this new address (i.e. sahforum2) is permanent or just a temporary upgrade solution?

Sigh, Rolling Eyes was supposed to be temporary. There is one more minor upgrade to the forum software that I need to do, but it's been a year already... The URL change was to help preserve a backup of the older version of the forum files and database if needed.



Ron Miller
Stars! AutoHost

Report message to a moderator

Re: mod_rewrite sahforum to sahforum2 Tue, 30 July 2013 11:09 Go to previous messageGo to next message
Altruist is currently offline Altruist

 
Commander

Messages: 1068
Registered: August 2005
Location: Berlin
Ok, I've looked it up and it is, indeed, very simple.

At the moment all forum posts are available and accessable at
* http://starsautohost.org/sahforum2/...

To fix all (broken) URLs linking to the old forum we just need the following 2 lines:
code for .htaccess to redicrect /sahforum to /sahforum2
RewriteEngine on
Redirect /sahforum http://starsautohost.org/sahforum2


With those 2 lines every link to the old forum gets automatically redirected to the new temporary forum.

In the base directory of http://starsautohost.org/ there is probably a file called ".htaccess". Just place the above 2 lines into it and upload it. If there is no file called ".htaccess", just create one.

Ron wrote on Fri, 26 July 2013 04:32
Sigh, Rolling Eyes was supposed to be temporary. There is one more minor upgrade to the forum software that I need to do, but it's been a year already... The URL change was to help preserve a backup of the older version of the forum files and database if needed.


If you are done with that, we'll have the problem that all new links to /sahforum2 get broken. We can solve this as easily as before. Just replace the above 2 lines with the following:

code for .htaccess to redicrect /sahforum2 to /sahforum
RewriteEngine on
Redirect permanent /sahforum2 http://starsautohost.org/sahforum


This way all links are working at all times, wether they use /sahforum or sahforum2.

An explanation how to use redirect can be found at:
* https://httpd.apache.org/docs/2.2/mod/mod_alias.html#redirec t

Report message to a moderator

Re: mod_rewrite sahforum to sahforum2 Tue, 30 July 2013 17:11 Go to previous messageGo to next message
XyliGUN is currently offline XyliGUN

 
Ensign
Stars! V.I.P


Messages: 325
Registered: July 2004
Location: Russia, St.Petersburg

BTW, it looks like avatars is not anymore shown under control panel, at least mine is not there (I know it shouldn't be shown in my posts, but it was shown under profile settings before). Bug? Or just been lost on upgrade? Rolling Eyes


"Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something."
Robert A. Heinlein, Time Enough For Love

Report message to a moderator

Re: mod_rewrite sahforum to sahforum2 Wed, 31 July 2013 10:15 Go to previous message
Ron is currently offline Ron

 
Commander
Forum Administrator
Stars! AutoHost Administrator

Messages: 1231
Registered: October 2002
Location: Collegedale, TN
XyliGUN wrote on Tue, 30 July 2013 17:11
BTW, it looks like avatars is not anymore shown under control panel, at least mine is not there (I know it shouldn't be shown in my posts, but it was shown under profile settings before). Bug? Or just been lost on upgrade? Rolling Eyes

It's probably because I originally set avatars to only display when the user has a rank of Lt. or above.



Ron Miller
Stars! AutoHost

Report message to a moderator

Previous Topic: Stars! Forum Rank.. and where can I read more
Next Topic: Congrats to Lqdtr for being the 1300th member
Goto Forum:
  


Current Time: Thu Mar 28 15:33:09 EDT 2024