Page 1 of 1
Experimental: new option to allow slashes in alias
Posted: Tue 14. Feb 2012, 20:17
by flip-flop
... In combination with URL Rewrite you can fake segmented URLs.
Please have a look and test :
http://code.google.com/p/phpwcms/source/detail?r=440
Re: Experimental: new option to allow slashes in alias
Posted: Wed 15. Feb 2012, 02:49
by Jensensen
How, what, why, when ???
I still get /page.html instead of /category_1/subcat_32/page.html
and I never used 'slashes in alias' so far.
How do slashes effect rewrite? How to use this new feature?
Re: Experimental: new option to allow slashes in alias
Posted: Wed 15. Feb 2012, 07:50
by Oliver Georgi
To enable this feature first you have to set
Code: Select all
$phpwcms['alias_allow_slash'] = 1; // Allow slashes / in ALIAS
in conf.inc.php. Then it is possible to use slashes in the alias. You do not have to enable Rewrite at all – but you know better get rid of the index.php in URL.
At all – still a handjob to name your aliases like "
oh/my/gosh/what-a/brilliant/solution"
Then your URL will result in
http://example.com/oh/my/gosh/what-a/br ... ution.html (or whatever extension you have set in $phpwcms['rewrite_ext']).
To fix a behavior with relative URLs like local CSS, JavaScript, Images and so on when using segmented URLs the necessary
is injected into the HTML <head>.
Re: Experimental: new option to allow slashes in alias
Posted: Sun 4. Mar 2012, 13:41
by adamderesz
I find myself being more phpwcms fan and user/webmaster than 'coder' but from that solution (thumbs up, was looking forward to it patiently for a while)... well from that point, to, what we'd more need - an automatically generated url 'catalogues' path, is a very small step, I guess...
We do keep all site structure info in a table (permanently or update it every time a page is reloaded), right?
(there is a patch in frontend_render that shows strucure 'levels' so we do keep it for sure)
so once we do have a structure each time page refreshes - just pull out the structure aliases one by one, join with "/", put "rewrite-file-suffix" at the end.... et voila
point is that it requires someone that really knows the sys to do it in couple of lines of code - just to put it in a right place
I would struggle months on it, I guess... so I do keep fingers crossed for this feature to become standard, soon.
cheers
Adam
Re: Experimental: new option to allow slashes in alias
Posted: Tue 12. Mar 2013, 13:02
by adamderesz
Must say it out loud.
You guys rock! 
Just found that feature in one of latest releases ^^
best
Adam