"Friendly URL's"
-
- Posts: 11
- Joined: Thu 22. Jun 2006, 20:57
"Friendly URL's"
Is it possible to have a URL instead of this:
/root/index.php?id=0,2,0,0,1,0
More like this:
/root/pages/index.php
/root/index.php?id=0,2,0,0,1,0
More like this:
/root/pages/index.php
-
- Posts: 11
- Joined: Thu 22. Jun 2006, 20:57
- Klappstuhl28
- Posts: 833
- Joined: Fri 4. Mar 2005, 01:58
- Location: Hamburg
- Contact:
http://www.phpwcms-docu.de/artikel_erstellen.phtml (de)
http://www.phpwcms-docu.de/creating_articles.phtml (en)
It is possible that the article has to be
linked on the page.
http://www.phpwcms-docu.de/creating_articles.phtml (en)
It is possible that the article has to be
linked on the page.
Lars
Don't say you don't have enough time. You have exactly the same number of hours per day that were given to Helen Keller, Pasteur, Michaelangelo, Mother Teresa, Leonardo da Vinci, Thomas Jefferson, and Albert Einstein. - H. Jackson Brown -
Don't say you don't have enough time. You have exactly the same number of hours per day that were given to Helen Keller, Pasteur, Michaelangelo, Mother Teresa, Leonardo da Vinci, Thomas Jefferson, and Albert Einstein. - H. Jackson Brown -
I am trying to setup a friendly urls but they don't seem to be working. Is there anything that needs to be done.
I have an article, for instance called "news", but the link "www.mysite.com/index.php?news" doesn't seem to do anyting, it just takes me to to the default start page (i.e. index.php).
Am I just being stupid, or is something wrong?
Thanks
I have an article, for instance called "news", but the link "www.mysite.com/index.php?news" doesn't seem to do anyting, it just takes me to to the default start page (i.e. index.php).
Am I just being stupid, or is something wrong?
Thanks
- Klappstuhl28
- Posts: 833
- Joined: Fri 4. Mar 2005, 01:58
- Location: Hamburg
- Contact:
category and article set "public" and "visible"?
So that you get a green eye and also a green "V" and "P"
http://www.phpwcms-docu.de/creating_articles.phtml
http://www.phpwcms-docu.de/article.phtml
So that you get a green eye and also a green "V" and "P"
http://www.phpwcms-docu.de/creating_articles.phtml
http://www.phpwcms-docu.de/article.phtml
Lars
Don't say you don't have enough time. You have exactly the same number of hours per day that were given to Helen Keller, Pasteur, Michaelangelo, Mother Teresa, Leonardo da Vinci, Thomas Jefferson, and Albert Einstein. - H. Jackson Brown -
Don't say you don't have enough time. You have exactly the same number of hours per day that were given to Helen Keller, Pasteur, Michaelangelo, Mother Teresa, Leonardo da Vinci, Thomas Jefferson, and Albert Einstein. - H. Jackson Brown -
hi brewster66,
I think you are after somthing closer the 'modrewrite' this is were apche re-writes the url to a more reader friendly one.
you should search for help within this forum on modrewrite.
in short though...
within config.inc.php set the following line to = 1
then rename the file _.htaccess to .htaccess and edit this file in notepad of simmilar to include the following (removing the # on the line you wish to include and prefixing the line you do not wish to include with a #)....
now the name of your webpages will reflect that of the 'category alias' set within each catergory witihn the admin area (as mentioned in previous posts)
e.g. http://www.polygonsoup.net/portfolio.phtml
any pages without an alias with have the id number as the page name.
e.g http://www.polygonsoup.net/88.0.0.1.0.0.phtml
hope it helps.
I think you are after somthing closer the 'modrewrite' this is were apche re-writes the url to a more reader friendly one.
you should search for help within this forum on modrewrite.
in short though...
within config.inc.php set the following line to = 1
Code: Select all
$phpwcms["rewrite_url"] = 0; //whether URL should be rewritable
Code: Select all
# Rewrite functionality for phpwcms
# optimized by Jan212
# 18-04-2004
# Check that you have set Options FollowSymLinks
# and right Allow
RewriteEngine On
# maybe you need this
DirectoryIndex index.htm index.html index.php
# Default ReWrite settings for phpwcms
# ===============================================
# This will rewrite 0.0.0.0.0.0.phtml => index.php?id=0.0.0.0.0.0
RewriteRule ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.phtml$ index.php?id=$1,$2,$3,$4,$5,$6
# This will rewrite mypage.phtml => index.php?mypage
RewriteRule ^(.+)\.phtml$ index.php?$1
# If phpwcms is installed in a subdirectory,
# sample: "mysubdir" then use this (remove #)
# if above lines doesn't work for you
# ===============================================
#RewriteBase /mysubdir
#RewriteRule ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.phtml$ /mysubdir/index.php?id=$1,$2,$3,$4,$5,$6
#RewriteRule ^(.+)\.phtml$ /mysubdir/index.php?$1
# If you want to set rewrite logging
# ===============================================
#RewriteLog "/absolute/path/to/the/rewrite.log"
# 0 = Logging disabled, 9 = highest level of logging, only for debugging
#RewriteLogLevel 3
e.g. http://www.polygonsoup.net/portfolio.phtml
any pages without an alias with have the id number as the page name.
e.g http://www.polygonsoup.net/88.0.0.1.0.0.phtml
hope it helps.
Well it still doesn't work for me I know mod_rewrite is turned on on the server, but I don't know what I'm doing wrong, I've made sure its correct in the config file (I think) though not too sure about the .htaccess file - but I think that is correct as well.
I've now realised though that the site isn't actually viewable unless you are logged in - but everything seems to be green in the article menus, so I can't even show you my problem.
I've now realised though that the site isn't actually viewable unless you are logged in - but everything seems to be green in the article menus, so I can't even show you my problem.
Sub sub categorys doesnt work with rewrite
Hi, i have a little prob with rewrite,
on this level it works fine
http://www.domain.eu/site/sendstudio.phtml
but when going deeper in the structure it returns me to the index page:
http://www.domain.eu/site/33,0,0,1,0,0.phtml
(is http://www.mywebagent.eu/site )
Any suggestion?
Regards / Z
Fixed it, i forgot to put a alias on the sub sub categorys.
As i now understand if there is no alias it doesnt work?
on this level it works fine
http://www.domain.eu/site/sendstudio.phtml
but when going deeper in the structure it returns me to the index page:
http://www.domain.eu/site/33,0,0,1,0,0.phtml
(is http://www.mywebagent.eu/site )
Any suggestion?
Regards / Z
Fixed it, i forgot to put a alias on the sub sub categorys.
As i now understand if there is no alias it doesnt work?
Hi
you're right, if there is no Alias then no rewrite can do - it's easy to understand No Alias -> nothing to 'rewrite' or should phpwcms generate a 'Random' Alias
I will compare it with a Telefonnumber - if you don't have a Entry in the Phonebook, just the Number, you can dial the Number, but you don't know the Name. So Rewrite just 'looks' to the Phonebook-Name (Alias) and 'dials' the correct Number
you're right, if there is no Alias then no rewrite can do - it's easy to understand No Alias -> nothing to 'rewrite' or should phpwcms generate a 'Random' Alias

I will compare it with a Telefonnumber - if you don't have a Entry in the Phonebook, just the Number, you can dial the Number, but you don't know the Name. So Rewrite just 'looks' to the Phonebook-Name (Alias) and 'dials' the correct Number

- marcus@localhorst
- Posts: 815
- Joined: Fri 28. May 2004, 11:31
- Location: localhorst
- Contact:
hello,
take a look to this last post:
http://www.phpwcms.de/forum/viewtopic.p ... ht=rewrite
it's possible and you can see a working example here:
http:/-/www.autorenhaus-verlag.de/88.150.0.0.1. ... chen.phtml
just add the article headline to the url to make it human readable.
the only problem I've noticed (with or without this hack), phpwcms render urls in different ways. somtimes it uses the alias.phtml sometimes it uses the id.phtml (for artikles, which have alias) with my solution, there are somtimes 3 different urls with the same conten :-/
take a look to this last post:
http://www.phpwcms.de/forum/viewtopic.p ... ht=rewrite
it's possible and you can see a working example here:
http:/-/www.autorenhaus-verlag.de/88.150.0.0.1. ... chen.phtml
just add the article headline to the url to make it human readable.
the only problem I've noticed (with or without this hack), phpwcms render urls in different ways. somtimes it uses the alias.phtml sometimes it uses the id.phtml (for artikles, which have alias) with my solution, there are somtimes 3 different urls with the same conten :-/
Hi
maybe I'm wrong, but I think that nobody will remember a Link like this
For me the URL of a Site is what I remember and then there have to be a good Navigation - so I can find the Information what I'm looking for.
And the URL must have a relation to the Content - http://www.cars.tld with Content about Printers makes no sense
maybe I'm wrong, but I think that nobody will remember a Link like this
shure it is more 'readable' as index.php?12.23.34.00 or however it looks.
For me the URL of a Site is what I remember and then there have to be a good Navigation - so I can find the Information what I'm looking for.
And the URL must have a relation to the Content - http://www.cars.tld with Content about Printers makes no sense

- marcus@localhorst
- Posts: 815
- Joined: Fri 28. May 2004, 11:31
- Location: localhorst
- Contact:
yes, ok, real aliases/short urls are better than my version (it's just to read statistics more easily and the customer think it#s better for searchengines)
i realize the aliases via .htacces 301 redirect to the real phpwcms site
Redirect 301 http://mysite.de/alias http://mysite.de/41.36.0.0.1.0.phtml
maybe it is possible, to write the htaccess automatically?
i realize the aliases via .htacces 301 redirect to the real phpwcms site
Redirect 301 http://mysite.de/alias http://mysite.de/41.36.0.0.1.0.phtml
maybe it is possible, to write the htaccess automatically?