| Author |
|
lightguy1 Groupie

Joined: 08 July 2008
Online Status: Offline Posts: 44
|
| Posted: 16 July 2008 at 12:54pm | IP Logged
|
|
|
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 |
|
| |
tilly Groupie

Joined: 24 June 2008 Location: Neutral Zone
Online Status: Offline Posts: 49
|
| Posted: 16 July 2008 at 1:12pm | IP Logged
|
|
|
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 |
|
| |
lightguy1 Groupie

Joined: 08 July 2008
Online Status: Offline Posts: 44
|
| Posted: 16 July 2008 at 1:46pm | IP Logged
|
|
|
Tilly,
I need to allow a . character, not a / character.
Thanks
Edited by lightguy1 - 16 July 2008 at 1:49pm
|
| Back to Top |
|
| |
lightguy1 Groupie

Joined: 08 July 2008
Online Status: Offline Posts: 44
|
| Posted: 16 July 2008 at 2:21pm | IP Logged
|
|
|
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 |
|
| |
tilly Groupie

Joined: 24 June 2008 Location: Neutral Zone
Online Status: Offline Posts: 49
|
| Posted: 16 July 2008 at 2:31pm | IP Logged
|
|
|
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 |
|
| |
lightguy1 Groupie

Joined: 08 July 2008
Online Status: Offline Posts: 44
|
| Posted: 16 July 2008 at 2:37pm | IP Logged
|
|
|
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 |
|
| |
tilly Groupie

Joined: 24 June 2008 Location: Neutral Zone
Online Status: Offline Posts: 49
|
| Posted: 16 July 2008 at 2:56pm | IP Logged
|
|
|
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 |
|
| |
lightguy1 Groupie

Joined: 08 July 2008
Online Status: Offline Posts: 44
|
| Posted: 16 July 2008 at 2:58pm | IP Logged
|
|
|
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 |
|
| |
tilly Groupie

Joined: 24 June 2008 Location: Neutral Zone
Online Status: Offline Posts: 49
|
| Posted: 16 July 2008 at 3:06pm | IP Logged
|
|
|
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 |
|
| |
lightguy1 Groupie

Joined: 08 July 2008
Online Status: Offline Posts: 44
|
| Posted: 16 July 2008 at 3:42pm | IP Logged
|
|
|
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 |
|
| |
Vyacheslav Moderator Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 350
|
| Posted: 17 July 2008 at 1:33am | IP Logged
|
|
|
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.
|
| Back to Top |
|
| |
lightguy1 Groupie

Joined: 08 July 2008
Online Status: Offline Posts: 44
|
| Posted: 17 July 2008 at 10:06am | IP Logged
|
|
|
What does the Rewrite cond do with the -f and -d ??
|
| Back to Top |
|
| |
Vyacheslav Moderator Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 350
|
| Posted: 17 July 2008 at 10:38am | IP Logged
|
|
|
Hi lightguy1!
According to documentation:
'-f' Test string is existing file.
'-s' Test string is a file with nonzero size.
__________________ Kind regards!
Vyacheslav.
|
| Back to Top |
|
| |
lightguy1 Groupie

Joined: 08 July 2008
Online Status: Offline Posts: 44
|
| Posted: 17 July 2008 at 10:44am | IP Logged
|
|
|
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 |
|
| |
Vyacheslav Moderator Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 350
|
| Posted: 17 July 2008 at 11:00am | IP Logged
|
|
|
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.
|
| Back to Top |
|
| |