/    Sign up×
Community /Pin to ProfileBookmark

Need help with a redirect on htaccess

I’ve got a redirect in the index.php file in the root folder of ***.com

<?php
$goto = “http://www.***.com/catalog/”;
header(“HTTP/1.0 301 Moved Permanently”);
header (“Location: $goto”);

so when you type in [url]www.***.com[/url] in the web broweser it redirects to [url]www.***.com/catalog/[/url] to load the catalog.

I’m trying to install phpbb in the root so when I type in bbs.***.com it will load the bb, any ideas how to set this up so the redirect does not point bbs.***.com to [url]www.***.com/catalog/[/url] but still points [url]www.***.com[/url] to [url]www.***.com/catalog/[/url]

thanks in advance

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@WindowsauthorDec 03.2007 — Hi

Anyone got any ideas how I could do this please?
Copy linkTweet thisAlerts:
@sstalderDec 03.2007 — This is pretty helpful. Power of Google...

http://www.webconfs.com/how-to-redirect-a-webpage.php
Copy linkTweet thisAlerts:
@WindowsauthorDec 03.2007 — Hello

I know how to do a redirect with php, but do you know how to make an exclusion for a subdomain?
Copy linkTweet thisAlerts:
@sstalderDec 03.2007 — You can use .htaccess redirects (as in my link) or setup the subdomain directly in your hosting control panel (depending who it is).

Does your host have CPanel or anything close to that?
Copy linkTweet thisAlerts:
@WindowsauthorDec 03.2007 — Hi I have Ensim cp but couldnt find anywhere to set up a subdomain redirect. I have a redirect setup in htaccess to forward everyone from the root to the catalog folder, but this meens the subdomain is also forwarded to the catalog folder, I dont know how to set up the redirect so it doesnt forward the subdomain to the catalog but forwards everything else

(edited for spelling)
×

Success!

Help @Windows spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...