[Pro] Clean links action

Can somebody help me here with this action.
I create new folders and put one page in every folder.
What name am I suppose to give the folders I create?
And if I understand it right, I am suppose give new filenames to all my sides, and they should be index.anything.

I have so far made som tests with bad results.
I have named the folders with the name of my site.
eg. www.homepage.se/contact, then I have named the folder “contact” and the file inside has got the filename: index.contact.

Can somebody explain in a very clear way what I should do?
(I am kind of new to freeway an just published my fist sight)
Thanks
Johan

www.kapellet.se


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If you want the link www.homepage.se/contact to go to a single page within the contact folder then that page should be named index.html (www.homepage.se/contact/index.html)

And that applies to every folder you create as the server starts it search in a folder looking for the default (usually) index.html page - could be index.htm or index.php

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Another way to achieve this effect is through the .htaccess file that resides on your server. Simply add this block of code to it:

# BEGIN HIDE .HTML EXTENSION
    Options +FollowSymLinks -MultiViews
    DirectorySlash Off
    RewriteEngine On
    RewriteCond %{SCRIPT_FILENAME}/ -d
    RewriteCond %{SCRIPT_FILENAME}.html !-f
    RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L]
    RewriteCond %{ENV:REDIRECT_STATUS} ^$
    RewriteRule ^(.+).html$ /$1 [R=301,L]
    RewriteCond %{SCRIPT_FILENAME}.html -f
    RewriteRule [^/]$ %{REQUEST_URI}.html [QSA,L]
# END HIDE .HTML EXTENSION

Essentially, all this does is hide the .html file extension from any pages visited in a browser. example.com/contact.html will become example.com/contact. The nice thing is that you don’t have to worry about using subfolders for each and every page on your site!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thank you all for quick respond. I have now managed to solve my issue with the method described by Caleb. I works fine. Perfect.
I had to do som research on the net about how to edit .htaccess.

http://support.hostgator.com/articles/specialized-help/technical/apache-htaccess/how-to-edit-your-htaccess-file

Thank you all for helping me out.

Johan


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 4 Oct 2013, 6:53 pm, Caleb Grove wrote:

Another way to achieve this effect is through the .htaccess file that resides on your server. Simply add this block of code to it:

# BEGIN HIDE .HTML EXTENSION
    Options +FollowSymLinks -MultiViews
    DirectorySlash Off
    RewriteEngine On
    RewriteCond %{SCRIPT_FILENAME}/ -d
    RewriteCond %{SCRIPT_FILENAME}.html !-f
    RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L]
    RewriteCond %{ENV:REDIRECT_STATUS} ^$
    RewriteRule ^(.+).html$ /$1 [R=301,L]
    RewriteCond %{SCRIPT_FILENAME}.html -f
    RewriteRule [^/]$ %{REQUEST_URI}.html [QSA,L]
# END HIDE .HTML EXTENSION

Essentially, all this does is hide the .html file extension from any pages visited in a browser. example.com/contact.html will become example.com/contact. The nice thing is that you don’t have to worry about using subfolders for each and every page on your site!

Wow Caleb, this probably is the best tip I ever got, tnx!

Richard


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options