rewrite urls - help

I need to rewrite the urls in a site. Is there some simple code I can add? example: changing "http://www.mysite.com/about.html
to : "http://www.mysite.com/about
or "http://www.mysite.com/about/.

Basically, I want to get rid of the file extensions.
Can anyone provide some guidance?
Thank you.


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

Hi,

There are a couple of ways you could do this. One is more complicated,
it involves a bit of coding, for your server to permit you changing
the .htaccess file to parse a file named about… I really
don’t think this is what you are looking for, so the simpler solution
would be to create a folder in Freeway called ‘about’ (without
quotes), then place the about.html page in the about folder. Finally
you should change the about.html file to index.html

Now when someone went to: http://www.mysite.com/about/ the index page
in the about folder would load just as it would if they entered http://www.mysite.com/about/index.html

Is this what you need?

On Mar 2, 2008, at 10:58 PM, rebeccafonseca wrote:

I need to rewrite the urls in a site. Is there some simple code I
can add? example: changing "http://www.mysite.com/about.html
to : "http://www.mysite.com/about
or "http://www.mysite.com/about/.

Basically, I want to get rid of the file extensions.
Can anyone provide some guidance?
Thank you.


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

Sometime around 2/3/08 (at 16:58 -0500) rebeccafonseca said:

I need to rewrite the urls in a site. Is there some simple code I
can add? example: changing http://www.mysite.com/about.html
to http://www.mysite.com/about
or http://www.mysite.com/about/

Basically, I want to get rid of the file extensions.

You have two options…

Option one: Make folders with the right name, put the right page
inside the right folder, and change each page’s file name to
“index.html” so it is served by default when someone goes to that
folder.

Option two: Set up a redirect rule for each of those suffix-free
addresses and point them to the equivalent actual page. I have info
on this in my ‘Be Found’ article here:
http://www.thehelpful.com/befound/using-htaccess.html

The thing to note is that an address to a page requires a filename
suffix. You can mess with how this works if you have enough control
over the server, but it is basic, fundamental Internet behaviour.
Doing anything deeper than the above options will lead to confusion
for the average end user.

I recommend option two, but you’ll need to be hosted on a Unix-based
web server running Apache. Don’t panic, the odds are that you are.

k


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

This may be frowned upon in Freeway purist circles but it is
perfectly possible to do this simply with an FTP client like
Transmit. Upload your files with Freeway. Then access the host with
Transmit and edit the file names to remove the suffix. Job done.

However, next time you revise/upload with Freeway the suffix will be
reinstated so you need to go through the procedure again. And all
internal/external links will need to reflect the suffixless page in
advance so you need to be on the ball with all that. Perhaps more
hassle than it’s worth…? maybe the more technical solutions offered
by others will fit the bill better.

cheers
Pete

On 2 Mar 2008, at 21:58, rebeccafonseca wrote:

I need to rewrite the urls in a site. Is there some simple code I
can add? example: changing "http://www.mysite.com/about.html
to : "http://www.mysite.com/about
or "http://www.mysite.com/about/.

Basically, I want to get rid of the file extensions.
Can anyone provide some guidance?
Thank you.


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


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

If you remove the extensions from the filenames, then the web server
will not know what to do with them. Remember, a Web server relies on
the underlying operating system for a lot of the information it needs
to fulfill a request. On Unix, Linux or even Windows, the filename
extension is a required bit of data that tells the operating system
(and thus the Web server) what sort of file it is serving, and
therefore what sort of header to send it out under. If you don’t have
a file-type to associate with a file, Apache sends text/plain by
default. When a browser is served a full Web page under a text/plain
mime-type, it will just show the plain text to the visitor. So it
would be like opening your site in a text editor.

Walter

On Mar 2, 2008, at 6:01 PM, Pete MacKenzie wrote:

This may be frowned upon in Freeway purist circles but it is
perfectly possible to do this simply with an FTP client like
Transmit. Upload your files with Freeway. Then access the host with
Transmit and edit the file names to remove the suffix. Job done.

However, next time you revise/upload with Freeway the suffix will be
reinstated so you need to go through the procedure again. And all
internal/external links will need to reflect the suffixless page in
advance so you need to be on the ball with all that. Perhaps more
hassle than it’s worth…? maybe the more technical solutions offered
by others will fit the bill better.

cheers
Pete

On 2 Mar 2008, at 21:58, rebeccafonseca wrote:

I need to rewrite the urls in a site. Is there some simple code I
can add? example: changing "http://www.mysite.com/about.html
to : "http://www.mysite.com/about
or "http://www.mysite.com/about/.

Basically, I want to get rid of the file extensions.
Can anyone provide some guidance?
Thank you.


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


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


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

Hmmm, well i wouldn’t have suggested it if it hadn’t actually worked
for me in the past and apologies if I have misled here. Admittedly it
was only one page I felt the need to modify and some while ago so
maybe I have misremembered. I’ll get my coat…

Pete

On 2 Mar 2008, at 23:27, Walter Lee Davis wrote:

If you remove the extensions from the filenames, then the web server
will not know what to do with them. Remember, a Web server relies on
the underlying operating system for a lot of the information it needs
to fulfill a request. On Unix, Linux or even Windows, the filename
extension is a required bit of data that tells the operating system
(and thus the Web server) what sort of file it is serving, and
therefore what sort of header to send it out under. If you don’t have
a file-type to associate with a file, Apache sends text/plain by
default. When a browser is served a full Web page under a text/plain
mime-type, it will just show the plain text to the visitor. So it
would be like opening your site in a text editor.

Walter

On Mar 2, 2008, at 6:01 PM, Pete MacKenzie wrote:

This may be frowned upon in Freeway purist circles but it is
perfectly possible to do this simply with an FTP client like
Transmit. Upload your files with Freeway. Then access the host with
Transmit and edit the file names to remove the suffix. Job done.

However, next time you revise/upload with Freeway the suffix will be
reinstated so you need to go through the procedure again. And all
internal/external links will need to reflect the suffixless page in
advance so you need to be on the ball with all that. Perhaps more
hassle than it’s worth…? maybe the more technical solutions offered
by others will fit the bill better.

cheers
Pete

On 2 Mar 2008, at 21:58, rebeccafonseca wrote:

I need to rewrite the urls in a site. Is there some simple code I
can add? example: changing "http://www.mysite.com/about.html
to : "http://www.mysite.com/about
or "http://www.mysite.com/about/.

Basically, I want to get rid of the file extensions.
Can anyone provide some guidance?
Thank you.


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


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


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


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