PrettyURLs - How do you configure the settings?
PrettyURLs - How do you configure the settings?
Brand new user. I'm testing the waters because I'd like to migrate my blog away from Wordpress and flat-file CMSs have always intrigued me. Anyway, I've searched the wiki and the forums and I'm stumped at how to get PrettyURLs to work. My URLS contain .php and question marks and otherwise don't look pretty which tells me something isn't configured.
Re: PrettyURLs - How do you configure the settings?
A softaculous instance of of flatpress installed here (might be expired by the time someone visits) has URLs that look mostly identical to my installation. For example...
BLOG - softaculous.com/FlatPresssdgnspmxjy/?paged=1
ABOUT -softaculous.com/FlatPresssdgnspmxjy/static.php?page=about
CONTACT - softaculous.com/FlatPresssdgnspmxjy/contact.php
What specifically are the formatted URLs supposed to look like when this plugin is active?
BLOG - softaculous.com/FlatPresssdgnspmxjy/?paged=1
ABOUT -softaculous.com/FlatPresssdgnspmxjy/static.php?page=about
CONTACT - softaculous.com/FlatPresssdgnspmxjy/contact.php
What specifically are the formatted URLs supposed to look like when this plugin is active?
Re: PrettyURLs - How do you configure the settings?
I'm getting an internal Server error when I click on the link.
Re: PrettyURLs - How do you configure the settings?
Looks like softaculous deletes their demo sites after about 30 minutes. If you want to install another demo and view the results, click here and to access the admin, the useraname/password is admin/password.
- fraenkiman
- Posts: 253
- Joined: Thu Feb 03, 2022 7:25 pm
- Location: Berlin, Germany
- Contact:
Re: PrettyURLs - How do you configure the settings?
Hello Dorian,
basically the PrettyURL plugin works quite well.
A blog entry can be reached as follows, depending on the settings:
Automatically
Path Info
HTTP Get
Pretty
For the plugin to work as expected, mod_rewrite must be installed on the web server.
Furthermore, the plugin should be allowed to create a new .htaccess file in the root directory. The content of this file then looks something like this:
There is an issue with an enhancement suggestion on Github via the PrettyURL plugin. It may be possible to create a rewrite rule in the .htaccess file.
I'll take a closer look in the days.
With best regards
Frank
basically the PrettyURL plugin works quite well.
A blog entry can be reached as follows, depending on the settings:
Automatically
Code: Select all
https://frank-web.dedyn.io/index.php/2023/01/29/flatpress-13-andante-soll-veroffentlicht-werden/
Code: Select all
https://frank-web.dedyn.io/index.php/2023/01/29/flatpress-13-andante-soll-veroffentlicht-werden/
Code: Select all
https://frank-web.dedyn.io/?u=/2023/01/29/flatpress-13-andante-soll-veroffentlicht-werden/
Code: Select all
https://frank-web.dedyn.io/2023/01/29/flatpress-13-andante-soll-veroffentlicht-werden/
Furthermore, the plugin should be allowed to create a new .htaccess file in the root directory. The content of this file then looks something like this:
Code: Select all
Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z0-9_-]+)/$ ./static.php?page=$1 [L]
RewriteRule ^.+/comments/$ ./comments.php [L]
RewriteRule ^(.+)/$ blog.php [L]
</IfModule>
I'll take a closer look in the days.
With best regards
Frank
You are strong in PHP and Java Script? Then help us to improve FlatPress.
Looking for ideas, templates, examples and answers to frequently asked questions?
You'll find it here.
My FlatPress-Blog: https://frank-web.dedyn.io
Looking for ideas, templates, examples and answers to frequently asked questions?
You'll find it here.
My FlatPress-Blog: https://frank-web.dedyn.io
Re: PrettyURLs - How do you configure the settings?
Would it be complicated to make the URLs more closely match wordpress' /%postname%/ setting? In this case they would look similar to this...
https://frank-web.dedyn.io/flatpress-13-andante-soll-veroffentlicht-werden/
Rather than including the date portion...
https://frank-web.dedyn.io/2023/01/29/flatpress-13-andante-soll-veroffentlicht-werden/
https://frank-web.dedyn.io/flatpress-13-andante-soll-veroffentlicht-werden/
Rather than including the date portion...
https://frank-web.dedyn.io/2023/01/29/flatpress-13-andante-soll-veroffentlicht-werden/
- fraenkiman
- Posts: 253
- Joined: Thu Feb 03, 2022 7:25 pm
- Location: Berlin, Germany
- Contact:
Re: PrettyURLs - How do you configure the settings?
Hello Dorin,
the date in the URL belongs to the fixed permalink structure of FlatPress.
The process of removing the date from your permalinks is extremely common but can be detrimental if done incorrectly. It can negatively impact both SEO and Google search rankings for your FlatPress website.
I have successfully tested a redirect rule for the .htaccess file.
For the rule to work, you need to set the mode to "Pretty" in the PrettyURL plugin.
However, before this rule, you need to rewrite it so that /YYYY/MM/DD is removed from the URL.
With the rewrite I don't get a consistent result.
I have created a suggestion for improvement.
With best regards
Frank
the date in the URL belongs to the fixed permalink structure of FlatPress.
The process of removing the date from your permalinks is extremely common but can be detrimental if done incorrectly. It can negatively impact both SEO and Google search rankings for your FlatPress website.
I have successfully tested a redirect rule for the .htaccess file.
Code: Select all
RedirectMatch 301 ^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(?!page/)(.+)$ https://your-website.ltd/$4
However, before this rule, you need to rewrite it so that /YYYY/MM/DD is removed from the URL.
With the rewrite I don't get a consistent result.
I have created a suggestion for improvement.
With best regards
Frank
You are strong in PHP and Java Script? Then help us to improve FlatPress.
Looking for ideas, templates, examples and answers to frequently asked questions?
You'll find it here.
My FlatPress-Blog: https://frank-web.dedyn.io
Looking for ideas, templates, examples and answers to frequently asked questions?
You'll find it here.
My FlatPress-Blog: https://frank-web.dedyn.io
Who is online
Users browsing this forum: No registered users and 1 guest