Link to home
Start Free TrialLog in
Avatar of LearningLearning
LearningLearning

asked on

basic domain .htaccess redirection

Hi

I am in a shared hosting server

/public_html/ ( root for www.domain.com)
/publc_html/a/ (root for www.domainA.com)
/public_html/b/ (root for www.domainB.com)
.....etc
total 50 domains

-------------------------------------------------------------------------------
I edit /public_html/.htaccess

RewriteCond %{HTTP_HOST} ^(www\.)?domaina\.com [NC]
RewriteRule ^(.*)$ http://www.sedoparking.com/domaina.com [R=302,L]

RewriteCond %{HTTP_HOST} ^(www\.)?domainb\.com [NC]
RewriteRule ^(.*)$ http://www.sedoparking.com/domainb.com [R=302,L]

......... etc

My question:
So is it I have to do these 2 lines for 50 times (for 50 domains)...
Is there better way of doing this?
minimize my works?
I am willing to clarify my question...
Thanks













ASKER CERTIFIED SOLUTION
Avatar of ravenpl
ravenpl
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
But You my also match against the directory(one letter exactly?)

RewriteCond ^(.)/.* http://www.sedoparking.com/domain$1.com [R=302,L]
Avatar of LearningLearning
LearningLearning

ASKER

actually all the domains are different name.
So is it I have to add 50 * 2 lines in the .htaccess?
or there are 2 lines codes that will make the job easier?
> actually all the domains are different name.
I understand they are totally different like domaina.com nextdomain.com thirddomain.com ?
Maybe then subfolders(You said they're a/ b/ c/) have something in common with redirection URL?

If nothing in common, You need those 50(*2) entries...