Current location: Hot Scripts Forums » Other Discussions » Web Servers » Redirect for .htacess with masking....urgent!


Redirect for .htacess with masking....urgent!

Reply
  #1 (permalink)  
Old 12-31-08, 12:04 PM
buijon buijon is offline
New Member
 
Join Date: Dec 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Redirect for .htacess with masking....urgent!

Ok I tried to read some of the tutorials in the top post but none of it makes sense to me and I have until midnight to get this sorted out. Heres my situation

I want to redirect my website to one of its subdirectories while masking the address bar to show simplified urls. For example, my site is set up like this

www.mywebsite.com/www/index.html

But I want people to only need to type in

www.mywebsite.com

and have it redirect to the sub directory while still only displaying www.mywebsite.com in the address bar. I also would like to be able to have it do that with the subdirectories for the different sections..so

www.mywebsite.com/www/sol/index.html

would be accessible and displayed as

www.mywebsite.com/sol

Is this possible? My hosting provider does not allow masking, and told me to look up mod_rewrite with .htaccess to mask it. But that means very little to me. I could use some major help on this so I can launch my site for the New Year.

Thank you so much!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 12-31-08, 08:44 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
A very simple solution may be to set DocumentRoot to:

/home/mywebsite/www

then you don't need a redirect or anything.

http://httpd.apache.org/docs/2.0/mod...l#documentroot

You can't do this in the .htaccess file, you would have to do it in the server configuration or virtual host files. Your hosting provider could do that for you.

Another option would be to simply link down to the subdirectories from the www, using the commands like so:

Code:
cd /home/mywebsite/www
ln -s www/sol
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Certain Redirect Ishmell PHP 1 08-16-08 06:21 PM
please help me with redirect page Hoangsts ASP 3 12-08-06 09:58 AM
Redirect Script. RossC0 JavaScript 2 02-10-05 06:02 AM
Redirect previous 2 pages after login mcrob PHP 5 01-01-05 08:35 AM


All times are GMT -5. The time now is 08:20 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.