|
|
|
||||
|
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. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Too lazy to set a custom title
Industry Role:
Join Date: Sep 2002
Posts: 34,431
|
Mod_Rewrite Problem - Show How Smart You Are
i have a CMS - with a problem i haven't been able to solve. The CMS stores all the content for the various paysites/domains that use the CMS in a hidden /content directory - this content includes sample/preview content used on tours - the CMS uses PHP to get the preview content - that's alot of extra work for the server building these dynamic tour pages - under heavy traffic it will slow down tours - so I had somebody monkey around with it, so that preview images/movies no longer get pulled using the PHP script - and the solution works but it's clumsy as hell. I'm no geek so I had to get a friend to
write out the problem in geek speak - here it is mod_rewrite question --------------------------------- I have multiple domains domain1.com domain2.com etc paths are: /home/xxx/domain1.com /home/xxx/domain2.com I have a content folder in: /home/xxx/content I need to rewrite domain1.com/content/ to /home/xxx/content/ so I have this in .htaccess for each domain: RewriteEngine On RewriteRule content/(.*) /home/xxx/content/$1 [L] The problem is it doesn't work, when I go to domain1.com/content/1.jpg I get 404 error: "The requested URL /home/xxx/content/1.jpg was not found on this server." It apears to be treating the full path "/home/xxx/content/" as relative path i dunno - maybe somebody here will see where things are wrong. thanks
__________________
I moved my sites to Vacares Hosting. I've saved money, my hair is thicker, lost some weight too! Thanks Sly!
|
|
|
|
|
|
#2 |
|
Too lazy to set a custom title
Join Date: Jan 2002
Location: Holland
Posts: 9,870
|
the path on your server is different then the path shown in a browser
in your browser it might be something like html/index.html of your server it can be user/url/html/index.html so its likely the path in your script has to do 2 more steps like ../../
__________________
Don't let greediness blur your vision | You gotta let some shit slide icq - 441-456-888 |
|
|
|
|
|
#3 |
|
Too lazy to set a custom title
Industry Role:
Join Date: Sep 2002
Posts: 34,431
|
thanks - hope it's something simple like that.
__________________
I moved my sites to Vacares Hosting. I've saved money, my hair is thicker, lost some weight too! Thanks Sly!
|
|
|
|
|
|
#4 |
|
Confirmed User
Industry Role:
Join Date: Oct 2002
Location: lalaland
Posts: 2,120
|
Don't use Rewrites for that. Use an Alias.
Alias "/content/" "/home/xxx/content/" or something like that |
|
|
|
|
|
#5 |
|
Too lazy to set a custom title
Join Date: Jul 2003
Location: Netherlands
Posts: 10,127
|
using an alias is a nice idea
|
|
|
|
|
|
#6 |
|
V.I.P.
Join Date: Nov 2004
Location: InYour Head
Posts: 7,886
|
not that smart..sorry
|
|
|
|
|
|
#7 |
|
Confirmed User
Join Date: Jun 2004
Posts: 689
|
Yep, Alias would do what you want. The problem is that Alias directive does not work in .htaccess, you'll have to edit your <VirtualHost> entry in apache config.
__________________
Webmasters! Looking for new affiliate programs to promote? Affiliate Program Search <-- Search for programs with FHGs, RSS feed, specific niche sponsors, ... |
|
|
|