... 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
Experimental: new option to allow slashes in alias
Experimental: new option to allow slashes in alias
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Re: Experimental: new option to allow slashes in alias
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?
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?
- Oliver Georgi
- Site Admin
- Posts: 9907
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Re: Experimental: new option to allow slashes in alias
To enable this feature first you have to set 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>.
Code: Select all
$phpwcms['alias_allow_slash'] = 1; // Allow slashes / in ALIAS
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
Code: Select all
<base href="http://example.com">
- adamderesz
- Posts: 19
- Joined: Sat 3. Oct 2009, 14:06
- Location: Gdansk / Poland
- Contact:
Re: Experimental: new option to allow slashes in alias
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
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
- adamderesz
- Posts: 19
- Joined: Sat 3. Oct 2009, 14:06
- Location: Gdansk / Poland
- Contact:
Re: Experimental: new option to allow slashes in alias
Must say it out loud. You guys rock!
Just found that feature in one of latest releases ^^
best
Adam
Just found that feature in one of latest releases ^^
best
Adam