Have smart webpage names

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
rochak
Forum Members
Forum Members
Posts: 16
Joined: Mon Jan 23, 2012 12:00 pm

Have smart webpage names

Post by rochak »

Hi,

My web pages have a very long website link name e.g. http://www.greenfuture-group.com/index. ... reenenergy

how can I have cleaner webpage name like www.greenfuture-group.com/greenenergy/

etc...

Thanks,!
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: Have smart webpage names

Post by Wishbone »

User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Have smart webpage names

Post by Dr.CSS »

Open your config.php and add...

$config['url_rewriting'] = 'mod_rewrite';
$config['page_extension'] = '.html';

Then in the [[root]]/doc folder copy the htaccess.txt to the [[root]] (not the .htaccess that is in the doc folder) and rename it .htaccess and you should be good to go...

You may want to make sure your [[root]] doesn't have a .htaccess file already, in FTP you may need to turn on "show hidden files"...
rochak
Forum Members
Forum Members
Posts: 16
Joined: Mon Jan 23, 2012 12:00 pm

Re: Have smart webpage names

Post by rochak »

Hi

thanks, I tried your suggestion but it doesn't work

It is still the same as earlier :(
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Have smart webpage names

Post by Dr.CSS »

Can you describe the exact steps you tried?...
rochak
Forum Members
Forum Members
Posts: 16
Joined: Mon Jan 23, 2012 12:00 pm

Re: Have smart webpage names

Post by rochak »

hi dr.css

followed exactly your post

1. edited config. php
2. move htaccess from doc folder to root . Have attached my htaccess file

my website pages still have long names.. the moment I try smart webpage links it gives Page Not found error.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Have smart webpage names

Post by RonnyK »

DrCSS didnt say to copy the htaccess from the docs folder to the root, he mentioned to copy the file htaccess.txt (which is the example htaccess file) to the root as .htaccess. The file .htaccess in the docs folder, is the .htaccess of the docs-folder itself.

The use of .htaccess and url-rewriting will allow you to use shorter names, as the default .htaccess will trim the index.php?page= part of the url. With the use of the pageURL, which can be set by default, depending on the settings in GlobalSettings, you can steer how the URL is setup....

It can either be hierarchical, like /parent/child, or flat, like /child. THe page-URL field is manually updateable from the editpage itself.

Ronny
Post Reply

Return to “The Lounge”