Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 10-26-2009, 06:56 AM   #1
zentz
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Posts: 8,053
.htaccess question $50 award.

I have multiple dirs like this

/my.subdomain.com/subfolder_1/0001/index.html
/my.subdomain.com/subfolder_2/0002/index.html
/my.subdomain.com/subfolder_3/0003/index.html

They all have their own index.html file. I want to make them share one identical index.html which will be located in /my.subdomain.com/index.html

How can i do this with .htaccess? Is it possible or do i need to use symlinks?

$50 epassporte to the first one that post the solution.

Thank you
__________________
Programs that owe me money ---- Epassporte.com ~ $2700 | Protraffic.com ~ $2600 | XonDemand.com ~ $3000

Email: [email protected]
zentz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-26-2009, 07:04 AM   #2
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
If you have ssh access,then you can simply do ln index.html //my.subdomain.com/subfolder_1/0001/index.html
which will create symbolic link to original file.Repeat same command to all subfolders where you want to have identical file.

Last edited by Klen; 10-26-2009 at 07:05 AM..
Klen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-26-2009, 07:11 AM   #3
comeplay
Confirmed User
 
comeplay's Avatar
 
Join Date: Nov 2004
Location: Greater Washington DC
Posts: 1,435
ln -s /my.subdomain.com/index.html index.html
__________________
Top virtual hosts for under 10$? www.hostmylife.com | icq 50663030
comeplay is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-26-2009, 07:14 AM   #4
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
Quote:
Originally Posted by comeplay View Post
ln -s /my.subdomain.com/index.html index.html
Yes need to be s switch.
Klen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-26-2009, 07:19 AM   #5
zentz
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Posts: 8,053
the problem is there are hundreds of subfolders so it needs to be a batch command or something.
__________________
Programs that owe me money ---- Epassporte.com ~ $2700 | Protraffic.com ~ $2600 | XonDemand.com ~ $3000

Email: [email protected]
zentz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-26-2009, 07:20 AM   #6
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
Well in htaccess this should work:
RewriteCond %{HTTP_HOST} !^www\.mydomain\.com
RewriteRule (.*) http://www.mydomain.com/$1 [L,R=301]

RewriteCond %{REQUEST_FILENAME} !^/web
RewriteCond /home/path/to/public_html/%{REQUEST_FILENAME} !-f
RewriteCond /home/path/to/public_html/%{REQUEST_FILENAME} !-d
RewriteCond /home/path/to/public_html/%{REQUEST_FILENAME} !-l
RewriteRule ^(.+) /web$1
Klen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-26-2009, 08:05 AM   #7
darksoul
Confirmed User
 
darksoul's Avatar
 
Join Date: Apr 2002
Location: /root/
Posts: 4,997
this works for both situations:
/subfolder/0001/index.html and
/subfolder/0001/

Code:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^(/.*)/index.html$ [OR]
RewriteCond %{REQUEST_URI} ^(/.*)?/$
RewriteCond %{REQUEST_URI} !^/index.html$
RewriteRule . /index.html [L]
__________________
1337 5y54|)m1n: 157717888
BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
Cambooth
darksoul is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-26-2009, 09:16 AM   #8
V_RocKs
Damn Right I Kiss Ass!
 
Industry Role:
Join Date: Dec 2003
Location: Cowtown, USA
Posts: 32,409
Darksoul... good guy if you need something done on the server!
V_RocKs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-26-2009, 10:57 AM   #9
zentz
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Posts: 8,053
darksoul provided the best solution so the money was sent to him.

thank you
__________________
Programs that owe me money ---- Epassporte.com ~ $2700 | Protraffic.com ~ $2600 | XonDemand.com ~ $3000

Email: [email protected]
zentz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-26-2009, 11:24 AM   #10
Fat Panda
Porn is Dead. Move along.
 
Fat Panda's Avatar
 
Industry Role:
Join Date: Aug 2006
Posts: 13,295
good work darksoul
Fat Panda is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-26-2009, 11:29 AM   #11
seeandsee
Check SIG!
 
seeandsee's Avatar
 
Industry Role:
Join Date: Mar 2006
Location: Europe (Skype: gojkoas)
Posts: 50,945
nice done
__________________
BUY MY SIG - 50$/Year

Contact here
seeandsee is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-26-2009, 11:57 AM   #12
darksoul
Confirmed User
 
darksoul's Avatar
 
Join Date: Apr 2002
Location: /root/
Posts: 4,997
nice working with you
__________________
1337 5y54|)m1n: 157717888
BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
Cambooth
darksoul is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-26-2009, 12:43 PM   #13
Robocrop
Confirmed User
 
Robocrop's Avatar
 
Industry Role:
Join Date: Aug 2008
Location: Hollywood
Posts: 2,785
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^(/.*)/index.html$ [OR]
RewriteCond %{REQUEST_URI} ^(/.*)?/$
RewriteCond %{REQUEST_URI} !^/index.html$
RewriteRule . /index.html [L]
DO I WINNN???????????
Robocrop is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.