Hi Everyone,
I have a site that is being upgraded to the latest CMSMS and converting over to using pretty URLs. The links currently within the content use "index.php?page=name".
When they are clicked they work, but don't show the pretty URL name, just the actual link "index.php?page=name" in the URL bar.
Is there a way I can rewrite this in the htaccess file to hide that and show the pretty URL instead? Or do I have to scan all of the content and rewrite the links in the content as the pretty URLs?
Thank you in advance for your help.
Pretty URLs and Links
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Pretty URLs and Links
1. These config entries control how CMSMS generates URLS:
$config['url_rewriting'] = 'none|internal|mod_rewrite';
$config['page_extension'] = '.html';
if you configure CMSMS correctly, AND you did not type the links manually into your content (i.e: you used MenuManager and {cms_selflink} etc. to generate links) then when you change these variables (and clear the CMSMS cache) CMSMS should start generating links appropriately.
2. If you use internal pretty urls the URLS generated by CMSMS will look like <mysite>/index.php/path/to/page
3. If you use mod_rewrite format for pretty URLS, then the generated URLS will look like <mysite>/path/to/page
4. The .htaccess file has absolutely NOTHING to do with how links are generated in the output html. It is merely used for converting INCOMING pretty urls into a format that CMSMS can understand so that it can find the correct content to display.
$config['url_rewriting'] = 'none|internal|mod_rewrite';
$config['page_extension'] = '.html';
if you configure CMSMS correctly, AND you did not type the links manually into your content (i.e: you used MenuManager and {cms_selflink} etc. to generate links) then when you change these variables (and clear the CMSMS cache) CMSMS should start generating links appropriately.
2. If you use internal pretty urls the URLS generated by CMSMS will look like <mysite>/index.php/path/to/page
3. If you use mod_rewrite format for pretty URLS, then the generated URLS will look like <mysite>/path/to/page
4. The .htaccess file has absolutely NOTHING to do with how links are generated in the output html. It is merely used for converting INCOMING pretty urls into a format that CMSMS can understand so that it can find the correct content to display.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Pretty URLs and Links
Yikes!
Yes, unfortunately links were manually entered as "index.php?page=name". It looks like I am just going to have to clean out the contents and replace them with the {cms_selflink}. It's a bit tedious but will prove efficient in the long run.
Thank you for your informative answer.
Yes, unfortunately links were manually entered as "index.php?page=name". It looks like I am just going to have to clean out the contents and replace them with the {cms_selflink}. It's a bit tedious but will prove efficient in the long run.
Thank you for your informative answer.