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
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 07-24-2006, 04:32 AM   #1
Mutt
Too lazy to set a custom title
 
Mutt's Avatar
 
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!
Mutt is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-24-2006, 04:35 AM   #2
grumpy
Too lazy to set a custom title
 
grumpy's Avatar
 
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
grumpy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-24-2006, 04:40 AM   #3
Mutt
Too lazy to set a custom title
 
Mutt's Avatar
 
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!
Mutt is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-24-2006, 04:43 AM   #4
extreme
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
extreme is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-24-2006, 04:45 AM   #5
gooddomains
Too lazy to set a custom title
 
Join Date: Jul 2003
Location: Netherlands
Posts: 10,127
using an alias is a nice idea
gooddomains is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-24-2006, 06:23 AM   #6
DEA - banned for life
V.I.P.
 
Join Date: Nov 2004
Location: InYour Head
Posts: 7,886
not that smart..sorry
DEA - banned for life is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-24-2006, 08:11 AM   #7
J.P.
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, ...
J.P. 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



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.