Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2019-09-08 10:30:36
- franzl
- Member
- From: germany
- Registered: 2019-08-11
- Posts: 33
Add a trailing slash
Hey!
Is there any way to add a trailing slash?
· blog/
· blog/article/
Offline
Re: Add a trailing slash
If you simply manually place a slash after your txp:permlink tag, e.g <txp:permlink />/
or <txp:section />/
Textpattern will create those links in the respective html code. If I recall correctly Textpattern should respond correctly to those as long out of the box. You can easily try it out on your site by simply placing an extra slash in the browser’s url bar and seeing if you get the desired result.
TXP Builders – finely-crafted code, design and txp
Offline
#3 2019-09-13 15:41:43
- franzl
- Member
- From: germany
- Registered: 2019-08-11
- Posts: 33
Re: Add a trailing slash
Unfortunately thats not the solution.
It possible to add a slash by editing the HTACCES file. So it will automatically add a trailing slash.
If I do so, even when I manually add a trailing slash in the browsers adress bar I´m getting a 404 error.
Any other suggestions?
Offline
Re: Add a trailing slash
OK, I cannot pretend that I know what I am recommending here but try changing
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]
to
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/]) - [PT,L]
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#5 2019-09-14 08:10:59
- franzl
- Member
- From: germany
- Registered: 2019-08-11
- Posts: 33
Re: Add a trailing slash
Thanks colak. I know how to change the htaccess to get an trailing slash at the end of the url.
That is not the problem. I want Textpattern to open and render an artikel with that slash. Textpattern is not able to deliver an url with an trailing slash.
Offline
Offline
#7 2019-09-15 15:24:03
- franzl
- Member
- From: germany
- Registered: 2019-08-11
- Posts: 33
Re: Add a trailing slash
Ah okay. Now all comes together.
Thanks to jakob, colak and etc.
@etc: Thats it. That was my fault to have the wrong permlink.
Offline
Pages: 1