Broken ReWrite rule in .htaccess
- Status
- Open
- Subject
- Broken ReWrite rule in .htaccess
- Version
- 3.x
- Category
- Error
- Feature
- Search engine optimization (SEO)
- Resolution status
- New
- Submitted by
- maclauk
- Lastmod by
- maclauk
- Rating
- Related-to
- Description
On our site we use the short URLs enabled by the SEO feature. We have used the default TikiWiki .htaccess file.
One of our blogs has grown to a reasonable size and users of it were claiming that the link at the bottom of the page to the next set of entries wasn't working. I confirmed this to be the case.
Looking at the source loaded into my browser for the page on clicking the "next page" button the following link should have been called :
Copy to clipboard/blog1?offset=20Manually entering this link did not work either. However if I entered the full URL below I did get the blog posts I was hoping for:
Copy to clipboardtiki-view_blog.php?blogId=1&offset=20
I therefore suspected that the ReWrite rule was not correct. The standard rule is:Copy to clipboardRewriteRule ^blog([0-9]+) tiki-view_blog.php?blogId=$1 [QSA,L]
This standard rule chops off the end of the requested URL after the blog number, thereby removing the &offset=20 parameter.- Files
- Solution
The ReWrite rule needs to be expanded to the following to preserve parameters after the blog number:
Copy to clipboardRewriteRule ^blog([0-9]+)(.*)$ tiki-view_blog.php?blogId=$1$2 [QSA,L]
It is likely that this problem affects many TikiWiki features that use similar ReWrite rules.- Importance
- 3
- Priority
- 15
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 2774
- Created
- Wednesday 30 September, 2009 10:33:47 UTC
by Unknown - LastModif
- Saturday 06 July, 2024 10:21:44 UTC