Abour redirections

Discuss practical ways rearrange URLs using mod_rewrite.

Abour redirections

Postby doudou12 » Sun Jun 01, 2008 10:40 pm

Hello,

i got a small problem with my cpane i can't add redirects.
let me explain you: i have a directory named: forum, i want to redirect
this: http:/mydomain.com/forum to http://forum.mydomain.com *|*

when attempted to connect to a forum with this kind of url (
http://forum.xxxxx.com ) it's work fine but not when we try it like this : (
http://xxxxxx.com/forum ) *|.
in second part, i got this: * In order to accept POST request originating
from this domain, the admin must add this domain to the whitelist.

So that's why, to solve the problem i want to make the redirection. my
primary domain is: mydomain.com

Thank you

cedric
doudou12
 
Posts: 2
Joined: Sun Jun 01, 2008 10:34 pm

Postby richardk » Tue Jun 03, 2008 1:58 pm

Try the following in a .htaccess file in /forum
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} !^forum\.example\.com$ [NC]
RewriteRule ^(.*)$ http://forum.example.com/$1 [R=301,L]


Is it vBulletin? This post may interest you.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby doudou12 » Tue Jun 03, 2008 7:56 pm

do i need to remplace example by my domain ?

thanks
doudou12
 
Posts: 2
Joined: Sun Jun 01, 2008 10:34 pm

Postby richardk » Thu Jun 05, 2008 3:54 pm

Yes.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 106 guests

cron