Jump to content

Recommended Posts

Hi

My .htaccess file:
[code]
RewriteEngine On
Options +FollowSymlinks
RewriteBase /books/
RewriteRule ^(.*)/(.*)$ search.php?format=$1&isbn=$2
[/code]

Now this works fine to enable urls such as: http://localhost/books/format/isbn_number

But, the initial file is "index.html" , there is a logo on this page with the file src as: "images/logo.jpg"

When the page loads up, the logo image does not display. I look at the source and its pointing to the correct place, i even tried changing the src to "/images/logo.jpg" and "http://localhost/books/images/logo.jpg" and "/books/images/logo.jpg"

None of these work, why are my images vanishing? I have seen a few posts around stating to include the full path to the image in the HTML document but as I just explained this does not work

localhost/books/

Link to comment
https://forums.phpfreaks.com/topic/28632-htaccess-mod_rewrite-and-my-images/
Share on other sites

  • 3 months later...
Hi [b]glenelkins[/b]

if you still have problem,this is the solution

[b]RewriteEngine On
RewriteBase /
[b]RewriteRule ^prefabrik/images/(.*)$  images/$1[/b]
RewriteRule ^prefabrik/(.*).html      index.php?id=$1[/b]

and if you use two variables solution changes like that,

[b]RewriteEngine On
RewriteBase /
RewriteRule ^prefabrik/tekkat/images/(.*)$  images/$1
RewriteRule ^prefabrik/tekkat/(.*).html      /index.php?id=26&pl=$1[/b]

take care,bye :)
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.