GIDForums  

Go Back   GIDForums > Web Hosting Forums > Apache Web Server Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 05-Jan-2005, 10:29
JUNK KED JUNK KED is offline
Awaiting Email Confirmation
 
Join Date: Oct 2003
Location: uk&ireland
Posts: 85
JUNK KED will become famous soon enough
Question

Mod rewite to disguise root


Hi guys,

I know that you can rewrite individual file paths to make them seo but has anyone ever used it to disguise the root forlder.

I am wondering is it possible to create custom parked pages with their own root folder.

Say you have 3 domains www.1.com www.2.net www.3.org and the first domain is hosted and the other 2 just pointed and parked in the first domain.

Is it possible to get the www.1.com in the file path rewritten to www.3.org

Or does rewrite only work on files and folders inside the root folder.

Is it possible to rewrite the root folder??
  #2  
Old 07-Jan-2005, 06:29
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Maybe you have not explained your issue well but from what I understand reading your message; yes, it's quite possible to do what you want to do.
  #3  
Old 07-Jan-2005, 14:51
JUNK KED JUNK KED is offline
Awaiting Email Confirmation
 
Join Date: Oct 2003
Location: uk&ireland
Posts: 85
JUNK KED will become famous soon enough

Mod rewrite to disguise root folder


Quote:
Originally Posted by JdS
Maybe you have not explained your issue well but from what I understand reading your message; yes, it's quite possible to do what you want to do.

Hi JdS,

I looked at the apache home site, the nearest thing I could find was to have the referring URL point to a sub folder and then rename the path but I haven't tested it yet. As I don't understand how mod rewrite actually works I was looking for a ready made example.

I should explain that I have the same name registered on three top level domains and that I want to have them all point to the same index page and use http_refer to see which page header and logo to use xxx.com to xxx.co.uk or xxx.biz. Also I'm a cheapskate
  #4  
Old 08-Jan-2005, 05:11
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
I still have to ask you for some details. Let's assume that the domain name is EXAMPLE.

Say you have the 3; i.e. example.com | example.co.uk | example.biz

How are these set up on your web server? Is something like this in place?

Code:
# example.com # WWW root: /home/user/domains/example.com/public_html # example.co.uk # WWW root: /home/user/domains/example.co.uk/public_html # example.biz # WWW root: /home/user/domains/example.biz/public_html
  #5  
Old 09-Jan-2005, 05:39
JUNK KED JUNK KED is offline
Awaiting Email Confirmation
 
Join Date: Oct 2003
Location: uk&ireland
Posts: 85
JUNK KED will become famous soon enough

more details on my setup


Hi JdS,

I will have to use .htaccess because I do not have access below my domain name folder, I am on a shared server.

I do not have an I.P.

xxx.com is hosted on this server.


xxx.co.uk and xxx.biz are parked on my registrars server and they are only forwarded to the hosted domain.

I can only host one domain on my hosting solution but I can have any domian forwarded but not parked.

For this reason I think the rules I saw at the apache home page will not work for me, they assumed that all donmains are parked on the same folder.

To test this I will have to use a test domain as I cannot test on xxx.com because it ias an active site. This will take sometime to propagate the test domains before I can start testing.

Anyway I will put the rules I think might work on here.

Basically what(I think) they are supposed to do is take the path to a target folder and rename it as an entire url including the . ( but as I said I am not sure because I have not studied mod_rewrites at all)

Code:
# For sites running on a port other than 80 RewriteCond %{HTTP_HOST} !^fully\.qualified\.domain\.name [NC] RewriteCond %{HTTP_HOST} !^$ RewriteCond %{SERVER_PORT} !^80$ RewriteRule ^/(.*) http://fully.qualified.domain.name:%{SERVER_PORT}/$1 [L,R] # And for a site running on port 80 RewriteCond %{HTTP_HOST} !^fully\.qualified\.domain\.name [NC] RewriteCond %{HTTP_HOST} !^$ RewriteRule ^/(.*) http://fully.qualified.domain.name/$1 [L,R]
Last edited by JUNK KED : 09-Jan-2005 at 05:42. Reason: add code
 
 

Recent GIDBlogInstall Adobe Flash - Without Administrator Rights by LocalTech

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
IPv6 added by ICANN to Root Servers 000 Web Hosting Forum 3 23-Jul-2004 04:04

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 21:41.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.