Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 3.0 support forum
 Helicon Tech : ISAPI_Rewrite 3.0 support forum
Subject Topic: My rewrite is partially working, help Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
lightguy1
Groupie
Groupie


Joined: 08 July 2008
Online Status: Offline
Posts: 44
Posted: 16 July 2008 at 12:54pm | IP Logged Quote lightguy1


My rewriteen url looks like this and will not process:
http://www.mysite.biz/products/SOCKETS+ADAPTERS+STARTERS/SOCKETS/GY6.35

The original url, which looks like this, will process:

http://www.mysite.biz/products.int?category=SOCKETS+ADAPTERS+STARTERS&subcat=SOCKETS&dept=GY6.35

What do I need to add to my config to allow the . paramater to get processed?

Current rule:
RewriteRule ^products/([^/.]+)(?:/([^/.]+)?(?:/([^/.]+))?)?/?$ products.int?category=$1?2&subcat=$2?3&dept=$3 [NC,L]

Thanks

Back to Top View lightguy1's Profile Search for other posts by lightguy1
 
tilly
Groupie
Groupie


Joined: 24 June 2008
Location: Neutral Zone
Online Status: Offline
Posts: 49
Posted: 16 July 2008 at 1:12pm | IP Logged Quote tilly

Hallow Lightguy1,

Please Try
Code:
RewriteRule ^products/([^/.]+)(?:/([^/.]+)?(?:/([\w\d\.]+))?)?/?$ products.int?category=$1?2&subcat=$2?3&dept=$3

If you need to have a dash just escape it first "\-".

Cheers,



Edited by tilly - 16 July 2008 at 1:15pm
Back to Top View tilly's Profile Search for other posts by tilly
 
lightguy1
Groupie
Groupie


Joined: 08 July 2008
Online Status: Offline
Posts: 44
Posted: 16 July 2008 at 1:46pm | IP Logged Quote lightguy1

Tilly,

I need to allow a . character, not a / character.

Thanks


Edited by lightguy1 - 16 July 2008 at 1:49pm
Back to Top View lightguy1's Profile Search for other posts by lightguy1
 
lightguy1
Groupie
Groupie


Joined: 08 July 2008
Online Status: Offline
Posts: 44
Posted: 16 July 2008 at 2:21pm | IP Logged Quote lightguy1

Got it working in Firefox, but IE will not display any of my images if I call up a url in this format:

http://www.mysite.biz/products/FLUORESCENT/COMPACT+FLUORESCENT

**NOTE FIREFOX WILL WORK FINE. ANY IDEAS?

Here is an example of where it is tryying to call an image from:

http://www.mysite.biz/products/FLUORESCENT/itemimages/CF-COIL_T.JPG




Edited by lightguy1 - 16 July 2008 at 2:25pm
Back to Top View lightguy1's Profile Search for other posts by lightguy1
 
tilly
Groupie
Groupie


Joined: 24 June 2008
Location: Neutral Zone
Online Status: Offline
Posts: 49
Posted: 16 July 2008 at 2:31pm | IP Logged Quote tilly

Im quoting Yaroslav
Yaroslav wrote:
This is common problem of incorrect document base. You need to use root-relative links to your images or HTML <BASE> tag to explicitly specify correct document base for pages.


Hope that helps



Edited by tilly - 16 July 2008 at 2:33pm
Back to Top View tilly's Profile Search for other posts by tilly
 
lightguy1
Groupie
Groupie


Joined: 08 July 2008
Online Status: Offline
Posts: 44
Posted: 16 July 2008 at 2:37pm | IP Logged Quote lightguy1

Right now my images are linked like this: ../Images/Clearance_off.gif

What do you mean my HTML <BASE> tag to explicitly specify correct document base for pages????


Thanks
Back to Top View lightguy1's Profile Search for other posts by lightguy1
 
tilly
Groupie
Groupie


Joined: 24 June 2008
Location: Neutral Zone
Online Status: Offline
Posts: 49
Posted: 16 July 2008 at 2:56pm | IP Logged Quote tilly

Like if you had absolute address like
<img src="http://www.dom.com/Images/Clearance_off.gif"/>
You set the BASE
<base href="http://www.dom.com/Images/"/>

then you can use <img src="Clearance_off.gif"/>

Dose that make sence? 



Edited by tilly - 16 July 2008 at 2:58pm
Back to Top View tilly's Profile Search for other posts by tilly
 
lightguy1
Groupie
Groupie


Joined: 08 July 2008
Online Status: Offline
Posts: 44
Posted: 16 July 2008 at 2:58pm | IP Logged Quote lightguy1

Where do I set that base href tag though?

I allready have a base href tag that looks like this:

<base href="http://www.interlight.biz" /base>

Do I change that to images? Or do I ad another base href tag?

Thanks

Back to Top View lightguy1's Profile Search for other posts by lightguy1
 
tilly
Groupie
Groupie


Joined: 24 June 2008
Location: Neutral Zone
Online Status: Offline
Posts: 49
Posted: 16 July 2008 at 3:06pm | IP Logged Quote tilly

Yes, you could change it to <base href="http://www.dom.com/Images/"/>

and base tag is a empty element <base/> not <base /base>

Back to Top View tilly's Profile Search for other posts by tilly
 
lightguy1
Groupie
Groupie


Joined: 08 July 2008
Online Status: Offline
Posts: 44
Posted: 16 July 2008 at 3:42pm | IP Logged Quote lightguy1

Hmm, when I try that it will mess up all images. I just will add the correct path to the url.

I can not get my java based menu to work.

Before:

<script type="text/javascript">var dmWorkPath = "data.files/";</script>
<script type="text/javascript" src="data.files/dmenu.js"></script>
<script type="text/javascript">var dmWorkPath = "topbar.files/";</script>
<script type="text/javascript" src="topbar.files/dmenu.js"></script>

After:

<script type="text/javascript">var dmWorkPath = "http://www.interlight.biz/data.files/";</script>
<script type="text/javascript" src="http://www.interlight.biz/data.files/dmenu.js"></script>
<script type="text/javascript">var dmWorkPath = "http://www.interlight.biz/topbar.files/";</script>
<script type="text/javascript" src="http://www.interlight.biz/topbar.files/dmenu.js"></script>

That still will not make the java menu work even with the full paths.

Any ideas?


Back to Top View lightguy1's Profile Search for other posts by lightguy1
 
Vyacheslav
Moderator Group
Moderator Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 578
Posted: 17 July 2008 at 1:33am | IP Logged Quote Vyacheslav

Hi lightguy1!

Please try the following solution:
Code:
RewriteBase /
RewriteCond %{REWRITE_FILENAME} !-f
RewriteCond %{REWRITE_FILENAME} !-d
RewriteRule ^products(?:/([^/.]+))?(?:/([^/.]+))?(?:/([^/]+))?/?$ products.int?category=$1&subcat=$2&dept=$3 [NC,L]


__________________
Kind regards!
Vyacheslav Shinkarenko, HeliconTech.
Back to Top View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 
lightguy1
Groupie
Groupie


Joined: 08 July 2008
Online Status: Offline
Posts: 44
Posted: 17 July 2008 at 10:06am | IP Logged Quote lightguy1

What does the Rewrite cond do with the -f and -d ??
Back to Top View lightguy1's Profile Search for other posts by lightguy1
 
Vyacheslav
Moderator Group
Moderator Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 578
Posted: 17 July 2008 at 10:38am | IP Logged Quote Vyacheslav

Hi lightguy1!

According to documentation:
'-f' Test string is existing file.   
'-s' Test string is a file with nonzero size.


__________________
Kind regards!
Vyacheslav Shinkarenko, HeliconTech.
Back to Top View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 
lightguy1
Groupie
Groupie


Joined: 08 July 2008
Online Status: Offline
Posts: 44
Posted: 17 July 2008 at 10:44am | IP Logged Quote lightguy1

Will those help with my images being properly displayed or what? I removed / from parameters so that problem is solved. I just cant get my images to display properly when using the rewritten urls for my cats, subcats, and depts. However all images display fine on my item pages when using the rewritten url
Back to Top View lightguy1's Profile Search for other posts by lightguy1
 
Vyacheslav
Moderator Group
Moderator Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 578
Posted: 17 July 2008 at 11:00am | IP Logged Quote Vyacheslav

Yes. The rule
Code:
RewriteCond %{REWRITE_FILENAME} !-f
excludes rewriting if requested url specifies a real file. It means is possible to apply to images, CSS/JS-files and other.

__________________
Kind regards!
Vyacheslav Shinkarenko, HeliconTech.
Back to Top View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum