#1 2011-03-24 13:18:35

markbed
Member
2011-03-24
6

Seo clean url with image name

Hi

is it possible to have a clean url with the image name,

for example

instead of having the url like this picture.php?/4/category/pics to index.php/pics/funnypic

funnypic is the name of the image, can i replace the image id with the image name ??

Regards,
thanks

Offline

 

#2 2011-03-24 13:30:29

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13863

Re: Seo clean url with image name

Hi markbed,

You can get something like myurl.com/picture/funnypic/category/570-second_weekend with the following configuration:

1) install/activate [extension by Piwigo Team] LocalFiles Editor from screen [Administration > Plugins > Manage]

2) open [Administration > Plugins > LocalFiles Editor > Local config] and paste the following code:

Code:

<?php
$conf['question_mark_in_urls'] = false;
$conf['php_extension_in_urls'] = false;
$conf['category_url_style'] = 'id-name';
$conf['picture_url_style'] = 'file';
?>

Please note that:

1) $conf['question_mark_in_urls'] = false requires that  AcceptPathInfo directive is enabled
2) $conf['php_extension_in_urls'] = false requires Options +MultiViews parameter

Offline

 

#3 2011-03-24 13:58:09

markbed
Member
2011-03-24
6

Re: Seo clean url with image name

Thank you for the quick respose

i have changed these to false

$conf['question_mark_in_urls'] = false
$conf['php_extension_in_urls'] = false

and added this into Local config

$conf['question_mark_in_urls'] = false;
$conf['php_extension_in_urls'] = false;
$conf['category_url_style'] = 'id-name';
$conf['picture_url_style'] = 'file';

the album link is broker misssing .php http://localhost/mydev/piwigo/index/categories
the same with gallery missing .php http://localhost/mydev/piwigo/index/category/2-my_gallery

and the image link is broker
http://localhost/mydev/piwigo/picture/jaws_wallpaper/category/Gallery

Thanks

Offline

 

#4 2011-03-24 14:13:37

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13863

Re: Seo clean url with image name

Please go step by step, you have to know what breaks your links. Is it $conf['question_mark_in_urls']=false  or $conf['php_extension_in_urls']=false ?

Offline

 

#5 2011-03-24 14:30:08

markbed
Member
2011-03-24
6

Re: Seo clean url with image name

i set $conf['php_extension_in_urls'] = true;
and  $conf['question_mark_in_urls'] = false


now my url is like this
http://localhost/mydev/piwigo/picture.php/funnypic/categories


how can i remove .php if i set php_extension_in_urls to false it's not wokring !!!!

Offline

 

#6 2011-03-24 14:33:25

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13863

Re: Seo clean url with image name

plg wrote:

2) $conf['php_extension_in_urls'] = false requires Options +MultiViews parameter

Offline

 

#7 2011-04-29 08:00:35

IcyHot
Member
2011-03-31
52

Re: Seo clean url with image name

plg wrote:

Hi markbed,

You can get something like myurl.com/picture/funnypic/category/570-second_weekend with the following configuration:

1) install/activate [extension by Piwigo Team] LocalFiles Editor from screen [Administration > Plugins > Manage]

2) open [Administration > Plugins > LocalFiles Editor > Local config] and paste the following code:

Code:

<?php
$conf['question_mark_in_urls'] = false;
$conf['php_extension_in_urls'] = false;
$conf['category_url_style'] = 'id-name';
$conf['picture_url_style'] = 'file';
?>

Please note that:

1) $conf['question_mark_in_urls'] = false requires that  AcceptPathInfo directive is enabled
2) $conf['php_extension_in_urls'] = false requires Options +MultiViews parameter

I was wondering where I set these directives?   I probably don't need to set them since the urls are working exactly as shown above after I followed the quoted directions.  I just figured I am missing some other feature of piwigo called "directives"

Offline

 

#8 2012-02-28 20:00:33

Guus
Guest

Re: Seo clean url with image name

Where do I find the following because I only get 404 error's:

1) $conf['question_mark_in_urls'] = false requires that  AcceptPathInfo directive is enabled
2) $conf['php_extension_in_urls'] = false requires Options +MultiViews parameter

Thanks,

Guus

 

#9 2012-04-01 16:28:35

Jan Cermak
Guest

Re: Seo clean url with image name

My hosting don't support Options +MultiViews in .htaccess. Is there any other choice to get this nice clean url? Etc. some rewrite in .htaccess? Thanks

 

#10 2012-05-02 12:56:33

PeteSlaughter
Guest

Re: Seo clean url with image name

How do I enable AcceptPathInfo directive and the Options + MultiViews parameter?




Thanks,
Pete

 

#11 2012-05-02 13:05:12

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Seo clean url with image name

Offline

 

#12 2012-05-02 13:14:23

PeteSlaughter
Guest

Re: Seo clean url with image name

mistic100 wrote:

in the htaccess file http://en.wikipedia.org/wiki/Htaccess

Thank you for your rapid response. I have edited .htaccess before and I just created one for my website OneDirectionWallpaper dot com, but I don't know the exact lines to write to enable AcceptPathInfo directive and the Options + MultiViews parameter. I guess my question is how do these lines need to look exactly?

I have done things like:

RewriteEngine on
RewriteRule ^/path/to/the/([a-z]*)/index.html$ /go/here/$1/other.html [L]


But I have have not been able to find out exactly what to write.



Thanks,
Pete

 

#13 2012-05-02 13:18:45

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Seo clean url with image name

the options lines are exactly

Code:

AcceptPathInfo On
Options +MultiViews

Last edited by mistic100 (2012-05-02 13:19:27)

Offline

 

#14 2012-05-02 13:42:58

PeteSlaughter
Guest

Re: Seo clean url with image name

Wow, I'm not too slow on the uptake, huh?


Thanks very much. Worked perfectly.



Kindest regards,
Pete

 

#15 2012-05-13 10:18:25

Marcia
Guest

Re: Seo clean url with image name

I did the following to two of my websites running on the same server.

"1) install/activate [extension by Piwigo Team] LocalFiles Editor from screen [Administration > Plugins > Manage]

2) open [Administration > Plugins > LocalFiles Editor > Local config] and paste the following code:
Code:

<?php
$conf['question_mark_in_urls'] = false;
$conf['php_extension_in_urls'] = false;
$conf['category_url_style'] = 'id-name';
$conf['picture_url_style'] = 'file';
?>"

Then I pasted this into each .htacess

AcceptPathInfo On
Options +MultiViews

This works perfectly on my site OneDirectionWallpaper(.)com, however, it does not work when I attempt to reach my categories folder for my site free-photos(.)org, I get a 404 error.

The url is exactly http://free-photos(.)org/index/category/1-models_female [Note I placed () around the dot to not make these active links. As you can see there's a 404 error.

I can't figure out why, could this have something to do with the url not including www, or what?

Any assistance will be greatly appreciated.

Thanks,
Marcia

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact