Dotclear

Vous n'êtes pas identifié(e).

Annonce

13 février 2024 Sortie de Dotclear 2.29

#1 2014-06-16 09:12:49

harryrossi
Membre
Inscription : 2014-06-16
Site Web

Clean/Pretty URLs, Remove "index.php?arg"

I have read through the forums (even the French posts) as well as searched elsewhere from Google.. and still cannot remove the "index.php?post" or "index.php?page" from the URL on my site to make them prettier. It seems the editing .htaccess is the way to go, but at best I could just remove the "index.php" portion but not the argument. Also it's just a redirect, so when you hover over the links you see the "ugly" URL.

What's the best way to rewrite URLs while keeping them SEF "Search Engine Friendly URLs"? A plugin for this would be great..!


Regards,
Harry Rossi

Hors ligne

#2 2014-06-16 12:59:23

Philippe
Stagiaire
Lieu : Toulon
Inscription : 2004-06-13
Site Web

Re : Clean/Pretty URLs, Remove "index.php?arg"

Hello and welcome here

You may rewrite Urls to remove index.php? in the usual manner with a .htaccess file containing :

<IfModule mod_rewrite.c>
	RewriteEngine on
	RewriteBase /
	RewriteCond %{REQUEST_FILENAME} !-f 
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule ^(.*)$ index.php?$1
</IfModule>

for a query_string blog. The blog parameters Url would then be :

 http://www.domain.tld/

(in spite of the warning saying that query_string Url should end up with a question mark...)

However, if you need to remove post or page from the Url it is less easy, as categories, posts and pages Urls may then collide with each other without this prefix. Some users managed to do it, though, but I do not believe that these words are useless in a Url and thus I leave them alone ;)

Hors ligne

#3 2014-06-17 09:00:12

harryrossi
Membre
Inscription : 2014-06-16
Site Web

Re : Clean/Pretty URLs, Remove "index.php?arg"

Thank you for your answer Philippe. Didn't do anything for me though.


Regards,
Harry Rossi

Hors ligne

#4 2014-06-17 16:31:12

effi
Membre
Inscription : 2014-06-17
Site Web

Re : Clean/Pretty URLs, Remove "index.php?arg"

hello !

I have the same problem : htaccess with 755 attributes do not remove  index.php? in url

when I remove the index.php? in the blogparameters url, I cannot open the post , it makes a 404 error

is it a bug from 2.6.3 ?


-------------
J'ai le même problème le fichier htaccess avec les indications de la doc ne fonctionne pas chez hostpapa : le index?php reste dans l'url
quand j'enlève le ? l'affichage en mode post ne fonctione plus et produit une erreur 404
est ce un bug ou un probleme de parametrage ?

Dernière modification par effi (2014-06-17 16:38:17)

Hors ligne

#5 2014-06-17 17:26:46

Philippe
Stagiaire
Lieu : Toulon
Inscription : 2004-06-13
Site Web

Re : Clean/Pretty URLs, Remove "index.php?arg"

I can explain how this works for me :

1) dotclear is installed in its own directory in www folder
2) the file index.php from dotclear package is copied and pasted in www folder, changing the path on line 22 this way:

require dirname(__FILE__).'/dotclear/inc/public/prepend.php';

3) blog url is as I said in answer #2 and the Url format is set to query_string
4) .htaccess file as described in answer #2 is placed in www directory

Hors ligne

#6 2014-08-16 13:29:50

tbtip
Membre
Lieu : Hoya ( Germany )
Inscription : 2011-03-18
Site Web

Re : Clean/Pretty URLs, Remove "index.php?arg"

I have published on my German blog about the blog software an appropriate contribution.

http://www.tbtip.de/dotclear/?post/Pret … ar/2014/08

Maybe this helps still further.

Dernière modification par tbtip (2014-08-16 13:30:36)


Leider beherrsche ich nicht die englische Sprache, deswegen helfe ich gerne in deutscher Sprache.
Meine Dotclear-Blogs: Weihnachtsblog; Weihnachtsmärkte in Deutschland, Österreich und der Schweiz; CMS-Systeme - Blogsoftware Dotclear und mehr auf Tbtip.de

Hors ligne

Vous n'êtes pas identifié(e).

Pied de page des forums

Sites map