SEO friendly URLs

5 posts by 3 authors in: Forums > CMS Builder
Last Post: December 30, 2011   (RSS)

By 1980 - December 26, 2011

Hi,

aren't there any rewrite settings in CMS Builder?

at the moment my details pages look like

eg
/index.php?Test-5

would like to have /Test-5.php or /Test-5/

Thanks

Re: [1980] SEO friendly URLs

By (Deleted User) - December 27, 2011 - edited: December 27, 2011

Hi 1980,

CMSB doesn't have a built in .htaccess editor so you'll have to create your own .htacces file and add the rewrite rules yourself.

To do so, create a plain text file and save it with the extension ".htaccess" (but no file name).

Edit that file and add the following (to change URL from "/Test-5" to "/index.php?Test-5" )

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^/([a-z]+)-([0-9]+) http://yourdomain.com/index.php?$1-$2 [NC]


This will allow you to use links in your code of the form "http://yourdomain.com/Test-5" and have the browser show the page as if it were viewing "http://yourdomain.com/index.php?Test-5".

There are a lot of things that .htaccess can do - a good resource for htaccess rules is http://www.htaccess-guide.com/.

Hope this helps,

Tom

Re: [Tom P] SEO friendly URLs

By 1980 - December 29, 2011 - edited: December 29, 2011

thanks for the help Tom

the actual file is called parody.php in a directory called 'index', so I tried the variations on following code

RewriteRule ^/index/parody.php?([a-z]+)-([0-9]+) http://www.mysite.com/index/parody.php?$1-$2 [NC]

[font "Verdana"]but that gives a 404 error (had a look on your link, but couldn't find more info on these rewrites)

Re: [Tom P] SEO friendly URLs

I'm looking for something similar, I think.

Is there a way for me to manually create an URL for a page or set up a "dummy" url that automatically forwards to a different page? I'm working on some public notifications and would like to have a web address on some printed documents. It would be nice to list a shorter address then what is automatically created by the CMS. For example, I would create a new page called www.wilmot.ca/trails which could be its own page or redirect to www.wilmot.ca/departments-development-details.php?Wilmot-Trails-4, whichever is easier.
Nigel Gordijk

Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net