cotonti.com : Url Modification Help! https://www.cotonti.com Последние сообщения в теме Cotonti en Thu, 09 Oct 2025 01:37:47 -0000 GHengeveld пт, 15 окт 2010 17:39:38 -0000 urlkiller
so basicly the htaccess file delivers a "rewritten" url for cot to understand and know how to work with. in your example to: page.php?id=123 .]]>
пт, 15 окт 2010 13:18:38 -0000
Twiebie I still have another question though.

Take for example this url on the Cotonti website:
www.cotonti.com/downloads/releases/genoa_0610
Normally that would be like this:
www.cotonti.com/page.php?id=23

How does that work?]]>
чт, 14 окт 2010 02:16:30 -0000
urlkiller One more note (not related to the above):
If you want to match a parameter in urltrans by using a * (for example e=someplug&var=*) but you don't want the value for 'var' to be in the output url, you have to put {!$var} instead of {$var}.
interesting!]]>
вс, 10 окт 2010 14:48:24 -0000
GHengeveld
plug	e=contactus	contact

In .htaccess:
RewriteRule ^contact$ plug.php?e=contactus [NC,NE,QSA,L]

You see, the rightmost column in urltrans.dat is what you put first in the rewriterule. The first two columns are combined and form the second part of your rewriterule.

One more note (not related to the above):
If you want to match a parameter in urltrans by using a * (for example e=someplug&var=*) but you don't want the value for 'var' to be in the output url, you have to put {!$var} instead of {$var}.]]>
чт, 07 окт 2010 02:54:47 -0000
Twiebie
If for example I would like to rewrite this url: /plug.php?e=contactus into /contact
What should be placed in urltrans.dat and what should be placed in .htaccess?

I'm trying to fully understand it before I might screw it up again..]]>
ср, 06 окт 2010 23:23:37 -0000
GHengeveld
It is actually very simple. You just have to make sure that your .htaccess rules match up with the urltrans rules. The most generic rules (* * {$_area}.php being the absolute most generic) should always be at the bottom. For example:

admin	m=*	admin/{$m}
admin	*	admin
pm	*	pm
users	*	members
index	*	home
rss	*	rss
*	*	{$_area}.php

The first item (column) on the line is the name of the file (script) you're writing the rule for, so forums.php becomes forums. The second item is the query string you want to match, but leaving off the questionmark at the beginning. A variable in your .htaccess is an asterisk (*) in urltrans.dat. The third item is what the url will come to look like after the transformation. This is what the .htaccess rewriterule should match. You can call a query string parameter from the second item by preceding it with a dollar sign ($) and enclosing it with accolades. See the first line in the example above: m=* becomes {$m}

Here's a more complicated rule (first the urltrans.dat line, then the .htaccess rule):

plug	e=userresults&u=*&resid=*&m=scores	{$u}/scores/{$resid}
RewriteRule ^(.*)/scores/([0-9]+)$
	plug.php?e=userresults&u=$1&resid=$2&m=scores [NC,NE,QSA,L]

I hope this helps. Don't forget that items/columns must be separated by one tab.]]>
вт, 05 окт 2010 04:24:09 -0000
peptobismal
Under the heading: Basic URL Tool Details
It gives this: http://xxx.xxx.xxx/admin.php?m=urls < As a way to go straight to the URL Modification, just reset it all back, instead of doing things the hard way. Other than that I am no help. I've been messing with values here and there to see which ones work for the pages without displaying different errors.]]>
пн, 04 окт 2010 14:43:14 -0000
Twiebie
I've tried to do some modifications on the url's, and I think I messed it up pretty good..

None of the url's in the account menu are working, the admin panel is not working as it should and a lot of other links do not work anymore and are all changed to www.mydomain.net instead of for example www.mydomain.com/admin.php

Is there any way I can reset this? :(

Edit: Pfew, replacing urltrans.dat with the original one from the Cotonti package got it back to normal.

I did read http://www.cotonti.com/docs/en/admin/url_modification, but I still can't really figure out how to set it up properly, can someone give me some assistence with this?]]>
сб, 02 окт 2010 01:12:25 -0000