Hello, like putting in so handy pluging urleditor
| elfrenazo |
|
|---|---|
|
Hello, like putting in so handy pluging urleditor. Do I have to create new rules? |
| Twiebie |
|
|---|---|
|
I think these rules will work with the Handy preset:
# Rewrite engine options
RewriteEngine On
# Server-relative path to Cotonti. Replace it with your path if you run Cotonti
# in a subfolder
RewriteBase "/"
# Language selector
#RewriteRule ^(en|ru|de|nl)/(.*) $2?l=$1 [QSA,NC,NE]
# Admin area and message are special scripts
RewriteRule ^admin/([a-z0-9]+) admin.php?m=$1 [QSA,NC,NE,L]
RewriteRule ^(admin|login|message)(/|\?|$) $1.php [QSA,NC,NE,L]
# All the rest goes through standard rewrite gateway
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]+) index.php?rwr=$1 [QSA,NC,NE,L]
Paste them in your .htaccess file. |
| elfrenazo |
|
|---|---|
|
thank you very much, it works. Failure administration panel. example enter malditopc.es/admin/extensions redirects me to start administration. I can do to fix it? |
| Trustmaster |
|
|---|---|
|
Are there any other rules in your .htaccess, apart from what Twiebie mentioned? May the Source be with you!
|
| elfrenazo |
|
|---|---|
|
I tried with nothing, it is strange. Any way to disable the admin rewrite? |
| Trustmaster |
|
|---|---|
|
Maybe this version can help:
# Rewrite engine options
Options -Indexes
RewriteEngine On
# Server-relative path to Cotonti. Replace it with your path if you run Cotonti
# in a subfolder
RewriteBase "/"
# Admin area and message are special scripts
RewriteRule ^admin/([a-z0-9]+) admin.php?m=$1 [QSA,NC,NE,L]
RewriteRule ^(admin|login|message)(/|\?|$) $1.php [QSA,NC,NE,L]
# System category has priority over /system folder
RewriteRule ^system/?$ index.php?rwr=system [QSA,NC,NE,L]
# All the rest goes through standard rewrite gateway
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]+) index.php?rwr=$1 [QSA,NC,NE,L]
May the Source be with you!
|
| elfrenazo |
|
|---|---|
|
It all works well. thank you very much Twiebie and Trustmaster |
| fraze |
|
|---|---|
|
sorry for hijacking. i've enabled Handy URLs and added that info to my htaccess but admin still wont work. i get the same problem elfrenazo did... |
| Trustmaster |
|
|---|---|
|
It seems that on some hosts you need Options -Indexes and on some hosts you don't. May the Source be with you!
|
| elfrenazo |
|
|---|---|
|
|
| fraze |
|
|---|---|
|
perfect - cheers elf :) |
| Macik |
|
|---|---|
|
Sorry for intervention... How I can generate with «cot_url» propper link for call ajax part of a plugin ? (I mean «plug.php?r=plugname» or something like this). https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F |
| Trustmaster |
|
|---|---|
|
There are no handy rules for AJAX links, so currently they are raw like: cot_url('plug', 'r=plugname') => index.php?r=plugname. May the Source be with you!
|
| Macik |
|
|---|---|
|
Another one question: My plugin uses complicated url like: lang/plugname/subcat/type/product/params/mode/ I can use Hooks=urleditor.rewrite.first to handle it and transform to actual parameters. But is there any way to compose url with my rules like cot_url does (by hook or else)? I can write own plug_url function, but it's not convinient to pay attention where to use cot_url and where plug_url. https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F |
| Trustmaster |
|
|---|---|
|
The only way currently available is defining your own cot_url_custom() function. Better solution proposals are welcome. May the Source be with you!
|