Announcement

#1 2009-06-22 05:47:59

GSM-S
Member
2007-12-31
38

modify .htaccess

How can we modify .htaccess so that the files would appear like this:

http://thelostwaters.com/gallery/index.php/category/2 FROM THIS http://thelostwaters.com/gallery/index.php?/category/2
http://thelostwaters.com/gallery/pictur … category/2 FROM THIS http://thelostwaters.com/gallery/pictur … category/2

and so that it wouldn't affect the admin.php. How can we do this?

Offline

 

#2 2009-06-22 22:14:14

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

Re: modify .htaccess

If I understand correctly, you mean "removing the question mark in the URL", right?

Activate the "LocalFiles Editor" plugin, then in the local configuration, write:

Code:

$conf['question_mark_in_urls'] = false;

Offline

 

#3 2009-06-22 23:50:29

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: modify .htaccess

And
Only if the server translates PATH_INFO and depends on the server AcceptPathInfo directive config.
See http://httpd.apache.org/docs/2.0/mod/co … ptpathinfo

Might be coded in your .htaccess


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#4 2009-06-23 03:11:38

GSM-S
Member
2007-12-31
38

Re: modify .htaccess

plg wrote:

If I understand correctly, you mean "removing the question mark in the URL", right?

Activate the "LocalFiles Editor" plugin, then in the local configuration, write:

Code:

$conf['question_mark_in_urls'] = false;

That worked but the problem is that the layout is all messed up. >_< How can I fix this?

Offline

 

#5 2009-06-23 11:41:54

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: modify .htaccess

I don't think that really works because you have to respect other constraints.

Failing: http://thelostwaters.com/gallery/picture.php/269

And expected result...
http://thelostwaters.com/gallery/picture.php?/269



example of a working website: http://www.modusoptimus.com/pwg/picture … es/flowers


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#6 2009-06-23 12:25:27

saqwild
Member
2009-06-13
64

Re: modify .htaccess

hi,
since this conversation is going on,can you please tell me how to include .php or .html in url i.e

http://thelostwaters.com/gallery/picture.php?/269
should look like
http://thelostwaters.com/gallery/category/269.php

thanks

Offline

 

#7 2009-06-23 13:25:07

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: modify .htaccess

php_extension_in_urls: ( There is an error in our documentation currently).


if false, the urls generated for picture and category will not contain the .php extension. This will work only if .htaccess defines Options +MultiViews parameter or url rewriting rules are active.


$conf['php_extension_in_urls'] = false;



Example: http://www.vdigital.org/phpwebgallery/i … nal_page/2

See: http://httpd.apache.org/docs/2.0/mod/core.html#Options

Nota: Options +MultiViews (Might be set as default  by your provider (That isn't your case in fact)).


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#8 2009-06-24 05:36:44

GSM-S
Member
2007-12-31
38

Re: modify .htaccess

VDigital wrote:

And
Only if the server translates PATH_INFO and depends on the server AcceptPathInfo directive config.
See http://httpd.apache.org/docs/2.0/mod/co … ptpathinfo

Might be coded in your .htaccess

Could you show me an example of the htaccess? (I'm still new to htaccess. >_<)

Offline

 

#9 2009-06-24 08:15:32

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: modify .htaccess

I will try to find a website where I can code it.
On my personal websites, I can't.

Maybe send a private mail to rvelices who did it.


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#10 2009-06-24 09:14:50

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: modify .htaccess

.htaccess with
AcceptPathInfo on

and your config_local.inc.php including:
$conf['question_mark_in_urls'] = false;


Is perfectly working except for some plugins (starting from some of mines).


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#11 2009-06-24 16:47:24

GSM-S
Member
2007-12-31
38

Re: modify .htaccess

VDigital wrote:

.htaccess with
AcceptPathInfo on

and your config_local.inc.php including:
$conf['question_mark_in_urls'] = false;


Is perfectly working except for some plugins (starting from some of mines).

I gotten a 500 error. x_x

the .htaccess file on my website.

Code:

AddHandler x-mapp-PHP5 .php
AcceptPathInfo on

Anyways, if this helps I use 1and1.com luniz hosting.

Offline

 

#12 2009-06-24 20:39:24

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: modify .htaccess

I am not expert in .htaccess
you should use a file filter: <Files ~...
to manage only .php and .html

Maybe someone else can help you to code your .htaccess (or 1&1 FAQ, 1&1 forum, 1&1 support with a ticket).


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#13 2009-06-25 17:25:17

GSM-S
Member
2007-12-31
38

Re: modify .htaccess

VDigital wrote:

I am not expert in .htaccess
you should use a file filter: <Files ~...
to manage only .php and .html

Maybe someone else can help you to code your .htaccess (or 1&1 FAQ, 1&1 forum, 1&1 support with a ticket).

I tried but no luck. >_<

Offline

 

Board footer

Powered by FluxBB

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