[closed-New Topic]Rewriting all URLs to abolute base path
[closed-New Topic]Rewriting all URLs to abolute base path
Ok, I can do this with any site, but I am wondering how you would approach this with CMSMS.
I'm wanting to do a URL structure like
subfolder/123.html
or just
subfolder/123
at the very least I'll settle for
subfolder/pagename
I can do the mod rewrites fine, wondering if I'm going to hack at the core, and where to start!
Thanks.
I'm wanting to do a URL structure like
subfolder/123.html
or just
subfolder/123
at the very least I'll settle for
subfolder/pagename
I can do the mod rewrites fine, wondering if I'm going to hack at the core, and where to start!
Thanks.
Last edited by CWebguy on Wed Mar 25, 2009 8:06 pm, edited 1 time in total.
CMSMS Made
Re: Rewriting all URLs to abolute base path
If you mean with subfolder, the parent/child in the menu, then you could do the following.
Copy the htaccess.txt from the /doc folder and put it in the root folder as .htaccess.
Then in the config.php change.
Copy the htaccess.txt from the /doc folder and put it in the root folder as .htaccess.
Then in the config.php change.
Ronny"Assume mod_rewrite"
"Use Hierachy Name"
And put ".html" in
"Page Extension"
Re: Rewriting all URLs to abolute base path
But I'm guessing I also need to change something in the core to change what links appear.
I'm going to take a wild guess and say the "menu manager".
Thanks by the way.
I'm going to take a wild guess and say the "menu manager".
Thanks by the way.
CMSMS Made
Re: Rewriting all URLs to abolute base path
With the logic I posted earlier, the links will appear like www.domain.com/parent/child/page.html
What other rewrite are you referring to?
Ronny
What other rewrite are you referring to?
Ronny
Re: Rewriting all URLs to abolute base path
well the parent/child/page.htm is what I have now.
I wanted it to be something like
foldernameichoose/1245 (12345 being the page ID #)
I guess I will need to look at the database to get a bigger understanding of the way everything works. Maybe write my own menu function.
I wanted it to be something like
foldernameichoose/1245 (12345 being the page ID #)
I guess I will need to look at the database to get a bigger understanding of the way everything works. Maybe write my own menu function.
CMSMS Made
Re: Rewriting all URLs to abolute base path
I guess I'm in for a major overhaul Be prepared for questions 

CMSMS Made
Re: Rewriting all URLs to abolute base path
OK, you mean the page-id instead of the alias to be passed to the URL?
What about making the alias then hold the page-id....
Ronny
What about making the alias then hold the page-id....
Ronny
Re: Rewriting all URLs to abolute base path
Interesting, I would still have to change the {content} to call the page ID instead of the content_name? no?
CMSMS Made
Re: Rewriting all URLs to abolute base path
It would mean, that you make the page_alias, which is set on the options-tab, to hold the id of the page. When you have autofill on in config.php for page-aliasses, it will make the alias, hold the page-name in lowercase, with spaces converted to a -.
You could either go to all the pages, and fill that field to hold the id instead. Or find some logic that does it for you.
Be aware that when modifying the core-sources, that support will be difficult, and that upgrade will become harder as well...
Ronny
You could either go to all the pages, and fill that field to hold the id instead. Or find some logic that does it for you.
Be aware that when modifying the core-sources, that support will be difficult, and that upgrade will become harder as well...
Ronny
Re: Rewriting all URLs to abolute base path
Hey thanks Ronny, I repped you.
Now how about removing the Child Element from each URL?
I have figured that if I just wanted:
example.com/parent/pagename
regardless, even if the current page is a child.
Any ideas? It doesn't have to be the page ID in the alias for this one. Maybe I'll start a new thread on this if no responses.
Thanks!
Now how about removing the Child Element from each URL?
I have figured that if I just wanted:
example.com/parent/pagename
regardless, even if the current page is a child.
Any ideas? It doesn't have to be the page ID in the alias for this one. Maybe I'll start a new thread on this if no responses.
Thanks!
CMSMS Made
Re: Rewriting all URLs to abolute base path
Why you going thru all this, if you don't mind my asking?...
Re: Rewriting all URLs to abolute base path
well, there is a site I want to work on, and right now I'm realizing I'm going to get very long URLs, so I'm wanting to cut everything down and keep it neat. I just want four main categories(parents) that everything is grouped under. If it's too hard I won't worry about it, but if someone had a solution it would definitly be helpful.
Thanks mark.
Lance
Thanks mark.
Lance
CMSMS Made
Re: Rewriting all URLs to abolute base path
it´s possible and easy but will need core modifications so.. any upggrade of the system would need a modification
Re: Rewriting all URLs to abolute base path
It sounds like you just need to make the parent pages and put all your child pages under them, that will give you yoursite.com/parent/child urls and they will be 'clean' if you use mod_rewrite with .htaccess...