Jump to content
SAU Community

Recommended Posts

Enable mod_rewite in httpd.conf in your apache config.

in the .htaccess file in the root dir put

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(forums|forum)?.skylinesaustralia.com$ [NC]

RewriteRule ^(.*)$ [url=http://www.skylinesaustralia.com/forums/$1]http://www.skylinesaustralia.com/forums/$1[/url] [R=301,L]

What this will do is redirect whoever types in forums.skylinesaustralia.com/whatever or forum.skylinesaustralia.com/whatever to www.skylinesaustralia.com/forums/whatever

You can do a whole shiteload of funky stuff with mod_rewrite, including making the whole forum indexable by search engines directly (ie they won't have to search thru archived pages).

Link to comment
https://www.sau.com.au/forums/topic/44666-fix-for-forumsskylinesaustraliacom/
Share on other sites

yeah that too. I'm assuming that the server's used to co host saunsw.com etc.

don't you have to restart apache if you use httpd.conf every time you make a new rewrite rule?

funky: true you do need to restart apache if you make changes to httpd.conf, but if he needs to enable mod_rewrite he'll need to restart it anyway

and your right it does look like it co-hosts saunsw.com, but don't see how that makes much difference, cept when he restarts apache, both will go down for a few moments :)

mod_rewrite... One of the best apache tools ;)

And I agree with using the .htaccess file for the above, that's what it's for. Otherwise you'd have to restart apache for every change. Might not make a difference with SAU, but on a commercial site, that's something to be avoided at all costs.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...