Jump to content

[SOLVED] htaccess and my images folder


envexlabs

Recommended Posts

Hey,

 

I have an htaccess file that changes the sites variables based on which partner sites refer the traffic.

 

So right now if sitea refers traffic, they point to this link:

 

http://mysite.com/sitea/workouts

 

the htaccess rule:

 

RewriteRule ^([a-zA-Z0-9_-]+)/workouts workouts.php?site=$1

 

Everything is working fine except on the workouts page, all the images are no longer showing up because the file structure is:

 

http://mysite.com/images/workouts/image.jpg

 

I guess the htaccess rule is messing up with the structure because of the wildcard rule after the main .com.

 

I've tried making a rule along the lines of:

 

RewriteRule ^images /images/

 

But it doesn't seem to work.

 

Am i missing a step?

 

Thanks,

 

envex (matt)

Link to comment
Share on other sites

Hey,

 

Thats the way it is right now.

 

I think it's because of the first wildcard option as well as the workouts folder inside the images folder.

 

The only images that aren't showing are the /images/workouts/image.jpg and it only happens when viewing, site.com/sitea/workouts

 

All other images are displaying correctly.

Link to comment
Share on other sites

  • 3 years later...

i have problem like envexlabs

in this address :

      http://localhost/ostanehfars/NewAdvertise

 

with this htaccess code:

      RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?Pages=$1

eveything is ok but when address change to :

      http://localhost/ostanehfars/NewAdvertise/success

with this htaccess code :

      RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ index.php?Pages=$1&Act=$2

it don`t show my pictures!!!

what can i do???

My Picture are in "Slices" folder in the root.

please help me.

 

Link to comment
Share on other sites

Use an absolute path in your image src

<img src="/Slices/image.jpg" />

no answer to me!

thankyou for reply,see i explain more:

 

all of my pages are in a folder with "Pages" name.

The "index.php" is in the root and all of page load in index.php.my images path is like this:

<img border="0" src="Slices/content2.gif" width="666" height="207">

what can i do?

Link to comment
Share on other sites

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.