MyBB Community Forums

Full Version: redirect problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I have the following problem:

- I've installed the forum in www.svetlana-logacheva.nl/112werkforum
- the actual name of the forum forum website is: www.112werkforum.nl which is a redirect by htaccess to www.svetlana-logacheva.nl/112werkforum

When I set the url in setting.php to www.112werkforum.nl/112werkforum the forum is now shown correctly... seems like without using the template.

When I set the url in setting.php to www.svetlana-logacheve.nl/112werkforum it does work.

Anyone I idea what is going wrong ?

Thanks in advance,

Fred
It doesn't seem to be redirecting.

What does the redirect rule in your .htaccess look like?

You should decide on one URL, redirect all others, and use bburl / cookie domain for the final URL in your board.
Thanks for your quick reply.

The .htaccess is like:

####SUBDOMAINS_HEADER####
RewriteEngine on
#RULE:www,112werkforum.nl,/112werkforum
#RULE:,112werkforum.nl,/112werkforum
RewriteCond %{HTTP_HOST} ^www.112werkforum.nl$
RewriteCond %{REQUEST_URI} !^/112werkforum/
RewriteRule (.*) /112werkforum/$1 [last]
RewriteCond %{HTTP_HOST} ^112werkforum.nl$
RewriteCond %{REQUEST_URI} !^/112werkforum/
RewriteRule (.*) /112werkforum/$1 [last]
####SUBDOMAINS_TAILER####

And I don't understand what you mean with decide on one URL, redirect all others, and use bburl / cookie domain for the final URL in your board" (sorry)

Fred
Now this .htaccess just hurts a lot. Did you make it or does your host make it this way?

It sucks because doing it like this it allows lots of duplicate URLs, for example, http://www.112werkforum.nl = http://www.svetlana-logacheva.nl/112werkforum = http://www.112werkforum.nl/112werkforum = those three URLs without www.

You should avoid duplicates, so decide on one name (e.g http://www.112werkforum.nl ) and have all others redirect there. Currently you have no redirects at all.

This may work but I haven't tested it. Check if your host lets you set up domains properly, it'd be better than making such shoddy htaccess setups.

RewriteEngine on

# redirect 112werkforum.nl to www.112werkforum.nl
RewriteCond %(HTTP_HOST) ^112werkforum\.nl$
RewriteRule (.*) http://www.112werkforum.nl/$1 [L,R=301]

# redirect anything trying to access the 112werkforum folder to www.112werkforum.nl
RewriteCond %(HTTP_HOST} !^www\.112werkforum\.nl$
RewriteCond %(REQUEST_URI} ^/112werkforum/
RewriteRule ^/112werkforum/(.*) http://www.112werkforum.nl/$1 [L,R=301]

# rewrite www.112werkforum.nl to the 112werkforum folder
RewriteCond %(HTTP_HOST) ^www\.112werkforum\.nl$
RewriteRule (.*) /112werkforum/$1 [L]
thanks a lot !!!

It works now !

And yes, the htaccess was made by the hosting software. The settings in the hosting software are very confusing which caused the problem.

Greetings, Fred
hmm, ^/112werkforum probably should be ^112werkforum in the above code (occurs twice)

It's not redirecting from svetlana-logacheva anyway.

good luck,
(2012-02-10, 11:51 PM)frostschutz Wrote: [ -> ]hmm, ^/112werkforum probably should be ^112werkforum in the above code (occurs twice)

It's not redirecting from svetlana-logacheva anyway.

good luck,

Hi Frost,

Thanks for your reply also... but it's working now. It was a confusing setting in at the host manager.

Regards, Fred