Where is the file that controls the way phpwebgallery writes out the files?
I'm trying to see if I could get the urls to look like...
/photo/285/487/White_horse.html
instead of
/pictures/picture.php?/94/category/4
Offline
Url rewriting has several standard solutions.
$conf['picture_url_style']
Install LocalFiles Editor
in ./plugins/
> Admin > Plugins > Adminintration > Install + Activate
LocalFiles Editor will help you to code the $conf['picture_url_style'].
8-)
// +-----------------------------------------------------------------------+ // | urls | // +-----------------------------------------------------------------------+ // question_mark_in_urls : the generated urls contain a ? sign. This can be // changed to false only if the server translates PATH_INFO variable // (depends on the server AcceptPathInfo directive configuration) $conf['question_mark_in_urls'] = true; // php_extension_in_urls : if true, 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'] = true; // category_url_style : one of 'id' (default) or 'id-name'. 'id-name' // means that an simplified ascii represntation of the category name will // appear in the url $conf['category_url_style'] = 'id'; // picture_url_style : one of 'id' (default), 'id-file' or 'file'. 'id-file' // or 'file' mean that the file name (without extension will appear in the // url). Note that one aditionnal sql query will occur if 'file' is choosen. // Note that you might experience navigation issues if you choose 'file' // and your file names are not unique $conf['picture_url_style'] = 'id'; // tag_url_style : one of 'id-tag' (default), 'id' or 'tag'. // Note that if you choose 'tag' and the url (ascii) representation of your // tags is not unique, all tags with the same url representation will be shown $conf['tag_url_style'] = 'id-tag';
Offline
// php_extension_in_urls : if true, 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;
what would i need to do to set it up so i could take out the php.php file?
do you have a seprate .htaccess file for the web gallery
Last edited by carminejg3 (2008-06-09 18:35:37)
Offline
You'll need to set the php_extension_in_urls value to "true". Then, you'll need to create a .htaccess file at the gallery root containing the line "Options +MultiViews"
Offline
Hi Guys,
With the mod-rewrites. What about the option to have the rewritten url end in html or php.
http://site.com/pictures/picture/718/ca … 5-infiniti
to
http://site.com/pictures/picture/718/ca … initi.html
is this possible or would it casue more problems
Offline
It would require a change in the way that PWG creates links and then a change in the .htaccess file. It shouldn't be too big of a change. I'll take a look this weekend.
Offline
Well it is possible, and it wouldn't be a _huge_ amount of work
Basically the make_section_in_url and make_index_url functions in functions_url.inc.php would have to change. Than an .htaccess file would need to be created.
However, I'm not sure if that is worth the effort just to add the .php extension.
Offline