PDA

View Full Version : Can't make .htaccess hide myu destination URL - HELP ?



taylormade
06-11-2008, 11:51 AM
I need to mask the destination URL in a re-direct.

Here's what to type in: tools.academicmanagement.com
Here's where its going: sugar.academicmanagement.com/sugarpro

Here's the .htaccess code:

RewriteEngine on|
RewriteCond %{HTTP_HOST} ^tools.academicmanagement.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.tools.academicmanagement.com$
RewriteRule ^(.*)$ "http\:\/\/sugar\.academicmanagement\.com\/sugarpro" [R=301,L]

The destination URL still shows in the address bar when landing on the page.

How can I have it still say: tools.academicmanagement.com

linFox
06-12-2008, 03:45 AM
mod_rewrite doesn't mask URLs across domains (in this case, subdomains). Any redirects to different domains will change the destination URL.

Also, by the way, the redirect code being used, 301 (Permanently Moved) forces a URL change as well. Any rules using a 301 redirect will change the URL client-side.

vinny
08-01-2008, 08:49 AM
So how can I mask thenexuspoint.com/nexusforums/files.php so it will be forums.thenexuspoint.com/files.php?

RDM
08-01-2008, 09:14 AM
Create a sub-domain in cPanel to point to that directory

vinny
08-01-2008, 09:24 AM
Create a sub-domain in cPanel to point to that directory

That doesn't mask the URL. If I go to forums.thenexuspoint.com, it shows up as thenexuspoint.com/nexusforums. I want it to always show forums.thenexuspoint.com in the URL bar.

RDM
08-01-2008, 09:49 AM
It may take a while for the domain to propagate correctly or you've got something in your .htaccess file that is redirecting it.

vinny
08-01-2008, 02:15 PM
It may take a while for the domain to propagate correctly or you've got something in your .htaccess file that is redirecting it.

I've added the subdomain over a week ago, it doesn't mask at all.

RDM
08-01-2008, 02:37 PM
What's in your .htaccess file?

vinny
08-01-2008, 07:39 PM
What's in your .htaccess file?


# Use PHP5CGI as default
AddHandler fcgid-script .php


That's it

Falcon1986
08-01-2008, 08:08 PM
See if this works. Try appending your .htaccess file with the following:


RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?thenexuspoint\.com$
RewriteRule ^nexusforums/(.*) http://forums.thenexuspoint.com/$1 [R=301,L]

vinny
08-01-2008, 08:29 PM
See if this works. Try appending your .htaccess file with the following:


RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?thenexuspoint\.com$
RewriteRule ^nexusforums/(.*) http://forums.thenexuspoint.com/$1 [R=301,L]

How long do I have to wait before this works?

And .htaccess in root directory?

Falcon1986
08-01-2008, 08:32 PM
It should be immediate. And yes, you are editing the .htaccess file in the public_html directory.

vinny
08-01-2008, 08:42 PM
It should be immediate. And yes, you are editing the .htaccess file in the public_html directory.

Nope. forums.thenexuspoint.com still shows up thenexuspoint.com/nexusforums

RDM
08-01-2008, 09:44 PM
Contact hostmonster support. Obviously there is a problem that only they can solve.

Falcon1986
08-01-2008, 11:03 PM
Is this a true subdomain in the first place? I have heard about "virtual subdomains", but I'm not sure if that would be what you are trying to set up in this situation.

I agree with RDM; contact HM Support and see what they have to say.

vinny
08-01-2008, 11:06 PM
Is this a true subdomain in the first place? I have heard about "virtual subdomains", but I'm not sure if that would be what you are trying to set up in this situation.

I agree with RDM; contact HM Support and see what they have to say.

I guess I'd have to ask for your definition of "true subdomain"

Falcon1986
08-02-2008, 10:10 AM
By "true subdomain" I am asking whether you first created the subdomain through the cPanel wizard, installed your forum and configured it to run under a subdomain, instead of just installing it in sub-directory first then trying to force it to look like a subdomain afterward.

It has been a while since I have used phpBB, but there should be instructions for installing it under a subdomain which would take care of this problem you are having.

If you are still trying to pursue an .htaccess mod you can try visiting the Mod_Rewrite Forums (http://forum.modrewrite.com/) and placing a request for there.