Hi
I was wondering if the mod rewrite function for phpwcms could be made to include the pathway of where you are in the site - like a breadcrumb - for example at the moment however deep you are in the site the url is always written like this
http://www.mysite.com/photography.phtml
This is great but is it posible to include the hierarchy of the site in the url - ie if the section 'photography'' is a child of the section 'Portfolio' it would be written like this:
http://www.domain.com/portfolio/photography.phtml
I noticed that in previous versions of wcms you could use '/' in an alias and thus produce this effect (as long as you had a base href link in the template) . This is no longer possible in the current DEV release.
Some may say this is not really neccessary but I think it looks more professional.
Cheers
Mod_rewrite question
-
Jimmy_Jazz
- Posts: 23
- Joined: Thu 28. Oct 2004, 13:04
- Location: London
-
Jimmy_Jazz
- Posts: 23
- Joined: Thu 28. Oct 2004, 13:04
- Location: London
Hi Pappnase
You would enter the alias as such:

make sure the header of the template has this html code:
the see here:
http://wallcreative.com/portfolio/thisi ... test.phtml
That was my work around the problem anyway.
But now in the DEV version it doesnt let you.
You would enter the alias as such:

make sure the header of the template has this html code:
Code: Select all
<base href="http://www.wallcreative.com/">http://wallcreative.com/portfolio/thisi ... test.phtml
That was my work around the problem anyway.
But now in the DEV version it doesnt let you.
fixed yet?
how about putting the following rule in your .htaccess file above your default page rewriting rules:
RewriteRule portfolio/(.*)$ $1 [PT]
This would rewrite portfolio/page.phtml to page.phtml and then to index.php?page, but to the user it'd appear as http://example.com/portfolio/page.phtml.
You'd need one such entry in htaccess for each directory you want to do this with though.
HTH
RewriteRule portfolio/(.*)$ $1 [PT]
This would rewrite portfolio/page.phtml to page.phtml and then to index.php?page, but to the user it'd appear as http://example.com/portfolio/page.phtml.
You'd need one such entry in htaccess for each directory you want to do this with though.
HTH