Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
| Search | Today's Posts | Mark Forums Read
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 14th, 2007, 02:25 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Oklahoma City, Oklahoma, USA.
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default rewriteengine missing images

My question is when using the RewriteRule below, my images on a page appear as missing due to the browser thinking the image folder is a few levels below it. So in order to fix this I have to apply full paths(http://www.mysite.com/images/abc.jpg) on every image. Is there a way to resolve this so I still just use images/abcd.jpg instead of the full paths.

RewriteRule ^usermanual/manual/?([^/]*)/?([^/]*)/? /usermanual/user_manual.php?overview=$1&content=$2 [PT]

Thank You
__________________
Peace
Mike
http://www.eclecticpixel.com
 
Old July 31st, 2007, 09:49 AM
Registered User
 
Join Date: Jul 2007
Location: Dhaka, Dhaka, Bangladesh.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to shimul39 Send a message via Yahoo to shimul39
Default

This is the best way to use full path for images or anything when you are using Rewrite Rule.

But you can overcome this by defining include path.

Try with
php_value include_path ".:/AbsolutePathHere/"

This may affect other path too. Anyways lets try but my suggestion is to use full path for all the path.

Thanks

http://www.shimul.info
 
Old September 5th, 2007, 08:16 AM
Registered User
 
Join Date: Jul 2007
Location: Dhaka, Dhaka, Bangladesh.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to shimul39 Send a message via Yahoo to shimul39
Default

Yeh you can define default include path.
php_value include_path ".:/var/www/vhosts/mydomain.com/httpdocs/images/"

Though this is not a good idea but as you asked for it.

Hope helps.
Thanks

http://www.shimul.info




Similar Threads
Thread Thread Starter Forum Replies Last Post
Load Images from and Save Images to a Database cyndie VB.NET 2 August 17th, 2008 06:42 AM
Is there some ':, missing ??? saban SQL Server ASP 1 May 28th, 2007 06:32 AM
What is missing? grstad SQL Language 11 March 6th, 2006 01:53 AM
what am i missing? m002864 Crystal Reports 0 July 6th, 2004 07:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.