Hi there,
I have some understanding problems with the uri patterns. After changing my site to s9y software some of my former links now match the PAT_COMMENTSUB pattern. That's a problem because before switching to s9y I had a slightly different formation of the urls (e.g. /categoryid-entryid/title.html). Sadly some links contain the old urls and now the COMMENTSUB pattern matches the first number in the uri (my old categoryid) and handles it as an entryid.
Now I wandered, what the COMMENTSUB pattern stands for and what would happen, if i'd dump that pattern. Any suggestions?
Thx
Greg
COMMENTSUB uri pattern
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Yes, s9y really requires unique URLs. You might need to work fix fixed prefixes like "/comments/" and "/entries/" etc. like s9y has by default. You could then use a custom .htaccess rewrite rule to redirect your old /X-Y/ style URLs to the new "/comments/X" style?
Regards,
Garvin
Yes, s9y really requires unique URLs. You might need to work fix fixed prefixes like "/comments/" and "/entries/" etc. like s9y has by default. You could then use a custom .htaccess rewrite rule to redirect your old /X-Y/ style URLs to the new "/comments/X" style?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Hi,
and thank you both for your input. I was able to solve the problem, not by removing the COMMENTSUB uri pattern from .htaccess, but by adding a separate rule in the index.php file. Now the entryview is only entered when the uri not only matches the COMMENTSUB pattern but also contains one of the commentpaths (approve, delete or unsubscribe).
Greg
and thank you both for your input. I was able to solve the problem, not by removing the COMMENTSUB uri pattern from .htaccess, but by adding a separate rule in the index.php file. Now the entryview is only entered when the uri not only matches the COMMENTSUB pattern but also contains one of the commentpaths (approve, delete or unsubscribe).
Greg
Yes, I didn't experience any problems till now.judebert wrote:Can visitors still leave comments and subscribe to entry comments?
Here is my modification:
Code: Select all
... else if (
((strstr($uri,$serendipity['permalinkApprovePath']) || strstr($uri,$serendipity['permalinkDeletePath']) || strstr($uri,$serendipity['permalinkUnsubscribePath'])) && preg_match(PAT_COMMENTSUB, $uri, $matches)) ||
preg_match(PAT_PERMALINK, $uri, $matches) ||
isset($serendipity['GET']['id']) ||
isset($_GET['p']) ) { ...
Regards,
Greg