| |||||||
| Register | Projects | FAQ | Members List | Mark Forums Read |
| | LinkBack | Thread Tools | Display Modes |
| |||
|
Hello, Dody... In the recent weeks, I modified too much my URL rewriting system, and I was blocked by a "detail" with the number of the different pages of the categories. I observed for hours all my modifications, and like I did not understand exactly where the regular expressions were wrong, I decided to start again with the original script of lib/mod-rewrite.lib.php and with the original ".htaccess" file. But at a given moment, I saw a strange thing : All the images of the index.php disappeared ! All the images of my admin section also disappeared. I believed it was a bug of my web host, but when I tried different things (step by step, looking at the style.css file, etc.) to try to see again my images, I saw that the error came from my ".htaccess" file ! So, when I identified the ".htaccess" file, I tried step by step lots of things (adding [L] at the end of the lines or $, inversing lines, etc.) At the end, I found the culprit : it was this line in the ".htaccess" file : RewriteRule ^(.*)/(.*)/(.*) /browse.php?cat=$1&pg_which=$3 I tried to add a $ before the /, but nothing happened... I tried to add a [L] at the end of the line, but nothing happened... And I tried to think. So, I told myself that the image folder was on "level 3" of the "///" organization. And I tried to modify that : (.*)/(.*)/(.*) ... to replace it by that ([0-9]+) And it was a miracle : it worked again ! My definitive line is like that RewriteRule ^(.*)/(.*)/([0-9]+)$ /browse.php?cat=$1&pg_which=$3 [L] ... because I arranged it to match with the rules of my web host. But the reason of the disappearance of the images was really the (.*) of the third level. What do you think of that ? Do you think it's due to a thing I lost when I made lots of modifications of your original script ? Or is it due to special configurations of certain web hosts ? I have not seen ".htaccess" file in the "/images" folder of the different themes. Mickey PS : why have I done all these modifications at the beginning ? It's simply because I wanted to get the "cat_path" in the URl intead of the "cat_name". With the cat_path, the URL is better to optimize the web site for search engines robots ![]() So, I'll try again step by step to modify ith the cat-path. But I wanted to speak to you of the strange affair of the disappearance of the images ![]() Maybe it's due to special Apache configurations ? I'll also modify the mod-rewrite.lib.php file to replace the (.*) by ([0-9]+)... But I'm impatient to read your answer before. |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Changing homepage link | kservik | v5.x | 4 | 03-14-2005 07:39 AM |
| Member's homepage error | yesonline | v5.x | 2 | 11-15-2004 08:38 AM |
| Links in category on homepage | bdewijs | v3.2 | 0 | 10-14-2004 01:17 PM |
| hot links in the homepage | Al Ghanah | v3.2 | 16 | 05-18-2004 07:15 PM |
| Indexu's homepage | debug | Pre-Sales Questions | 1 | 08-04-2003 09:59 PM |