haven't been here for a while, now I see there were some changes - sorry Paul for MPing you about the "no post button".
Here is the problem: I've been using mode rewrite for a while now, but recently noticed that a lot of my pages started to drop from Google's index (I disallow to crawl php files) and today I noticed that links detail url is rewritten only for the first link on the pages and others are original php links here is example www.ibsteam.net/wsnlinks/Re..._Estate_USA/South_Carolina
I have 10 latest comments on my home page that link to links details and all of them rewritten just fine http://www.ibsteam.net/wsnlinks/ (scroll down). Also, when I do search for the web sites it gives an option to see detail page too - rewritten just fine.
I have a feeling that I scrued something up in the displaylinks.tpl file, but can not find what exactly.. or may be not..
I just posted a test link on the left side of a category view (for example www.ibsteam.net/wsnlinks/Re..._Estate_USA/South_Carolina) I used href="href="link.php?action=detail&id=328" and it shows it as /links/detail/328 when live.. I still can't figure why in the world other links on the same page in the php format.. I even regenirated counters...
It must be a dumb question as usually, but I already looked over the manual and other forum posts - looked into different suggestions, but weren't unable to fix it Any hints would be appreciated.
I can't reproduce any such behavior on any site of mine, and I can't think of anything which could cause the first link in a category to be different form the others. Seems to me that it should either work or not work, and there's no sense in it working on one link but not others. Is there any sort of customization there which might be unique in some way?
Since you're using 3.12, trying 3.14 is always worth a try. I haven't tested in 3.12, only 3.14.
Yes, I've changed some stuff and moved things around... but what can make such affect? I'm not ready to update yet.. I've done database alterations, changes to templates etc and I'm afraid I can scrue things up by updating what I aready have.
It is really strange it does it - next link to "Details" is "Comments" and its rewritten everywhere just fine.. really strange. And also I have links on the right side under Featured Areas (SC state) which are rewritten correctly too and my test link looks fine on the left side... the only problem is in the category links except the first one. Kinda frustrating... let me know if you get any ideas at all except updating Thanks
I added only more variable to the "Move your link to the top" for my own purposes and it was breaking up mod rewrite after the first "Move your link to the top" link. Now I don't know how to create a correct mod rewrite to the link with the new variable: /wsnlinks/link.php?action=sponsor&id=262&sp=1 (added &sp=1) I enterend the following lines into the .htaccess RewriteRule ^links/([a-z]+)/([0-9]+)/([0-9]+)$ link.php?action=$1&id=$2&sp=$3 RewriteRule ^links/([a-z]+)/([0-9]+)/([0-9]+)/$ link.php?action=$1&id=$2&sp=$3 but it still doesn't work correctly, is there a file with the mod rewrite in the directory source? And what exactly I shold add? Thank you
Since I used C++ (which is similar in many ways since PHP itself is written in C++) in almost every class in college, it was fairly easy for me to teach myself PHP just using the PHP manual's function reference pages... I also got started on it by making a few little hacks for OpenBB (an old forum script) and then learned in the process of making WSN Links. I've never read any PHP books so I couldn't suggest them.
This is odd! I had the same problem with mod_rewrite again even though it was before the upgrade from 3.12 to 3.15. The problem didn't resolve after the upgrade, so I used the same fix you suggested above and it fixed it. I think you need to change it in your release once and forever.
0/5
1
2
3
4
5
This thread is closed, so you cannot post a reply.
Comments on mod rewrite problem
Forum Regular
Usergroup: Customer
Joined: Oct 30, 2003
Total Topics: 54
Total Comments: 197
Hi everyone,
haven't been here for a while, now I see there were some changes - sorry Paul for MPing you about the "no post button".
Here is the problem:
I've been using mode rewrite for a while now, but recently noticed that a lot of my pages started to drop from Google's index (I disallow to crawl php files) and today I noticed that links detail url is rewritten only for the first link on the pages and others are original php links
here is example
www.ibsteam.net/wsnlinks/Re..._Estate_USA/South_Carolina
I have 10 latest comments on my home page that link to links details and all of them rewritten just fine http://www.ibsteam.net/wsnlinks/ (scroll down).
Also, when I do search for the web sites it gives an option to see detail page too - rewritten just fine.
I have a feeling that I scrued something up in the displaylinks.tpl file, but can not find what exactly.. or may be not..
Thanks for your help!
Forum Regular
Usergroup: Customer
Joined: Oct 30, 2003
Total Topics: 54
Total Comments: 197
I just posted a test link on the left side of a category view
(for example www.ibsteam.net/wsnlinks/Re..._Estate_USA/South_Carolina)
I used href="href="link.php?action=detail&id=328" and it shows it as /links/detail/328 when live.. I still can't figure why in the world other links on the same page in the php format.. I even regenirated counters...
Forum Regular
Usergroup: Customer
Joined: Oct 30, 2003
Total Topics: 54
Total Comments: 197
It must be a dumb question as usually, but I already looked over the manual and other forum posts - looked into different suggestions, but weren't unable to fix it Any hints would be appreciated.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I can't reproduce any such behavior on any site of mine, and I can't think of anything which could cause the first link in a category to be different form the others. Seems to me that it should either work or not work, and there's no sense in it working on one link but not others. Is there any sort of customization there which might be unique in some way?
Since you're using 3.12, trying 3.14 is always worth a try. I haven't tested in 3.12, only 3.14.
Forum Regular
Usergroup: Customer
Joined: Oct 30, 2003
Total Topics: 54
Total Comments: 197
Yes, I've changed some stuff and moved things around... but what can make such affect? I'm not ready to update yet.. I've done database alterations, changes to templates etc and I'm afraid I can scrue things up by updating what I aready have.
It is really strange it does it - next link to "Details" is "Comments" and its rewritten everywhere just fine.. really strange. And also I have links on the right side under Featured Areas (SC state) which are rewritten correctly too and my test link looks fine on the left side... the only problem is in the category links except the first one. Kinda frustrating... let me know if you get any ideas at all except updating Thanks
Forum Regular
Usergroup: Customer
Joined: Oct 30, 2003
Total Topics: 54
Total Comments: 197
I finally figured out the reason:
I added only more variable to the "Move your link to the top" for my own purposes and it was breaking up mod rewrite after the first "Move your link to the top" link. Now I don't know how to create a correct mod rewrite to the link with the new variable:
/wsnlinks/link.php?action=sponsor&id=262&sp=1 (added &sp=1)
I enterend the following lines into the .htaccess
RewriteRule ^links/([a-z]+)/([0-9]+)/([0-9]+)$ link.php?action=$1&id=$2&sp=$3
RewriteRule ^links/([a-z]+)/([0-9]+)/([0-9]+)/$ link.php?action=$1&id=$2&sp=$3
but it still doesn't work correctly, is there a file with the mod rewrite in the directory source? And what exactly I shold add?
Thank you
Forum Regular
Usergroup: Customer
Joined: Oct 30, 2003
Total Topics: 54
Total Comments: 197
any thoughts?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
How could the 'move your link to the top' link be related to rewriting, when it's never supposed to be rewritten?
I have noticed that if you link to a details page with link.php?id=x&action=detail that messes it up (needs to be link.php?action=detail&id=x)
Edit: Ah, I see the sponsor link is getting rewritten for some odd reason. Perhaps disabling that will help. Open modrewrite.php and change
to
Forum Regular
Usergroup: Customer
Joined: Oct 30, 2003
Total Topics: 54
Total Comments: 197
Thank you very much Paul it work beautifully! Can you suggest any good books to learn PHP except the oficial PHP web site?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Since I used C++ (which is similar in many ways since PHP itself is written in C++) in almost every class in college, it was fairly easy for me to teach myself PHP just using the PHP manual's function reference pages... I also got started on it by making a few little hacks for OpenBB (an old forum script) and then learned in the process of making WSN Links. I've never read any PHP books so I couldn't suggest them.
Forum Regular
Usergroup: Customer
Joined: Oct 30, 2003
Total Topics: 54
Total Comments: 197
gotcha. Thanks for all your help!
Forum Regular
Usergroup: Customer
Joined: Oct 30, 2003
Total Topics: 54
Total Comments: 197
This is odd! I had the same problem with mod_rewrite again even though it was before the upgrade from 3.12 to 3.15. The problem didn't resolve after the upgrade, so I used the same fix you suggested above and it fixed it. I think you need to change it in your release once and forever.