Dotclear

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

Annonce

#1 2017-01-23 17:30:21

chris_h
Membre
Lieu : Port Orchard
Inscription : 2017-01-22

[SOLVED] How to remove index.php? from the path/query string? (SEF)

OK I've trawled the DC forum, and searched the interweb, and I've spent
some time tweaking the admin settings, and the .htaccess file, to remove
the index.php? portion from the query string shown in the URL.
But to no avail.
The following should work. But doesn't.

Options +FollowSymLinks -MultiViews
<IfModule mod_rewrite.c>
	RewriteEngine on
	RewriteBase /blogs/
	RewriteCond %{REQUEST_FILENAME} !-f 
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule ^(.*)$ index.php?$1 [L,QSA]
</IfModule>

The closest I've been able to achieve, still leaves the ? in the
URL. :(

Any help in this area would be greatly appreciated.

--Chris

Dernière modification par chris_h (2017-01-23 19:39:07)

Hors ligne

#2 2017-01-23 19:35:39

chris_h
Membre
Lieu : Port Orchard
Inscription : 2017-01-22

Re : [SOLVED] How to remove index.php? from the path/query string? (SEF)

OK I was able to sort it out myself.
For others also looking for the so-called "search engine friendly" UR(I|L)'s

NOTE
the following assumes: Dotclear is installed in /blogs/, on an Apache web server.

This was the only way I was able to achieve it:
In Blog settings > Advanced parameters > Blog details >
Blog URL:
http://waycool.site/blogs/
--- disregard the warning given by Dotclear, about the missing ? ---

Then, just below, under: URL scan method:
select:
QUERY_STRING

Next:
Create an .htaccess file in the folder you installed Dotclear in:

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

Lastly;
insure you allow the option to use an .htaccess file in the folder you installed
Dotclear in, or the file will simply be ignored, eg;
in httpd.conf:

AllowOverride All

Hopes this helps! ( and that it might get added to the docs shipped with Dotclear!)  =)

--Chris

Hors ligne

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

Pied de page des forums

Sites map