PDA

View Full Version : Redirects covering entire domain?


dcpaq2
03-29-07, 21:51
Group,

Anyone know how I can get a redirect on a domain to cover the entire domain like what an asteriks would do?

So instead of having to add in every possible folder that someone might visit be redirected, I would just do the domain name (www.example.com) for example and if someone was to enter in (www.example.com/forums) it would still redirect them.

Ive tried just entering www.example.com but it doesnt work. Entering in any folder extension takes me to an msn error page instead of being redirected.

Thanks

Doug

steven99
03-29-07, 23:42
Rewriteengine on
Rewriterule . http://example.com/
I believe should do it. (Or something like that.)

dcpaq2
03-29-07, 23:56
In the web options under the redirect feature withing the user cp, not server side right?

Doug

dynamicnet
03-30-07, 08:03
Greetings Doug:

What Steven accurately provided is in the .htaccess file on the server itself.

The CP redirect is on an object by object basis where typically an object equals a single HTML document.

Thank you.

dcpaq2
03-30-07, 09:53
I was asking about this regarding the redirect in the web options, perhaps he was thinking I was asking about something else?

http://www.psoft.net/HSdocumentation/user/manipulating_pages.html#redirect_url

Doug

dynamicnet
03-30-07, 10:19
Greetings Doug:

I re-read your original post, and Steven answered as I and several others would have answered.

If you want to redirect an entire domain name, then you need to look at using the Apache rewrite engine, PHP redirects (programming), and the like -- all done on the server level itself outside of H-Sphere.

Thank you.

dcpaq2
03-30-07, 10:25
Ok, So if I understand you guys correctly the "Web Options" redirect feature in Hsphere is only designed to redirect the exact url I enter into the box and not cover an entire domain?

If thats the case, I will look into your suggestions about Apache, or PHP Redirects.

Thanks Steven & Peter.

Doug

dynamicnet
03-30-07, 10:44
Greetings Doug:

Correct. The H-Sphere redirect URL is for single pages, documents, etc.

Thank you.

dcpaq2
03-30-07, 11:38
Ok, Thank you.

Doug