page with no .html

Discussion in 'HTML' started by olwen, Jun 30, 2003.

  1. olwen

    olwen Guest

    Help

    I Have just printed brochures, directing people to go to a page called
    ..../party, rather than .../party.html

    How can I insert a .../party page, and get the page to redirect (invisibly
    and immediately) to .../party.html

    please help urgently, as the brochure is being released tomorrow!

    Thank you
     
    olwen, Jun 30, 2003
    #1
    1. Advertising

  2. olwen

    Dylan Parry Guest

    olwen wrote:

    > Help
    >
    > I Have just printed brochures, directing people to go to a page called
    > .../party, rather than .../party.html
    >
    > How can I insert a .../party page, and get the page to redirect
    > (invisibly and immediately) to .../party.html


    If you use Apache as your server, and you can use .htaccess files, then
    you can do the following:

    1. Create a file called "htaccess.txt" in a proper text editor - not word
    or anything like that.

    2. Put the following three lines of text in the file:

    Options +FollowSymLinks
    RewriteEngine On
    ReWriteRule ^/([A-Z0-9a-z_]*) /$1.html [L]

    3. Upload the file in ASCII and rename it to ".htaccess"

    This should work as long as your server is Apache and you can use
    ..htaccess files - but be warned that it will affect every URL you use for
    your site.

    --
    Dylan Parry - http://www.DylanParry.com

    Not playing any music, but savouring the silence.
     
    Dylan Parry, Jun 30, 2003
    #2
    1. Advertising

  3. olwen

    Chris Morris Guest

    Dylan Parry <> writes:
    > > I Have just printed brochures, directing people to go to a page called
    > > .../party, rather than .../party.html

    >
    > If you use Apache as your server, and you can use .htaccess files, then
    > you can do the following:
    >
    > 2. Put the following three lines of text in the file:
    >
    > Options +FollowSymLinks
    > RewriteEngine On
    > ReWriteRule ^/([A-Z0-9a-z_]*) /$1.html [L]


    Won't that redirect http://www.example.com/foo/bar to
    http://www.example.com/foo.html and http://www.example.com/ to
    http://www.example.com/.html

    I think "Options +MultiViews" in the .htaccess file should be
    sufficient and more effective if it works, but otherwise, something
    like:
    RewriteRule ^/([A-Z0-9a-z_/-]+[^/\.])$ /$1.html [L]
    might be safer.

    Another alternative if .htaccess files don't work is to move .../party
    to .../party/index.html and assume that the server is configured
    reasonably normally and redirects .../party to .../party/ This method
    is probably the simplest, but has the disadvantage that any existing
    links and bookmarks to party.html won't work, which may be a bigger
    problem than it solves.

    --
    Chris
     
    Chris Morris, Jun 30, 2003
    #3
  4. olwen

    Dylan Parry Guest

    Dylan Parry, Jun 30, 2003
    #4
  5. In article <>,
    says...
    > Help
    >
    > I Have just printed brochures, directing people to go to a page called
    > .../party, rather than .../party.html
    >
    > How can I insert a .../party page, and get the page to redirect (invisibly
    > and immediately) to .../party.html
    >
    > please help urgently, as the brochure is being released tomorrow!
    >

    Could you create a directory called ../party and put a copy of
    party.html called index.html into that directory?
     
    Jacqui or (maybe) Pete, Jun 30, 2003
    #5
  6. olwen

    P@tty Ayers Guest


    > Could you create a directory called ../party and put a copy of
    > party.html called index.html into that directory?


    That's what I'd suggest. :)

    --
    P@tty Ayers
    http://www.WebDevBiz.com
    Business Resources for Web Developers
    Web Design Contract, Estimate Worksheet
    --
     
    P@tty Ayers, Jun 30, 2003
    #6
  7. olwen

    Geoff Ball Guest

    Dylan Parry wrote:

    > Chris Morris wrote:


    >>> ReWriteRule ^/([A-Z0-9a-z_]*) /$1.html [L]


    >> Won't that redirect http://www.example.com/foo/bar to
    >> http://www.example.com/foo.html and http://www.example.com/ to
    >> http://www.example.com/.html

    >
    > The first example certainly does screw it up, I think the second does too
    > :eek:) Silly me!


    Why not just:

    Redirect permanent /party /party.html

    Regards,
    Geoff

    --
    http://www.allmyfaqs.com/faq.pl?Geoff_Ball
    http://www.allmyfaqs.com/faq.pl?Web_Core_References
     
    Geoff Ball, Jun 30, 2003
    #7
  8. olwen

    brucie Guest

    brucie, Jul 18, 2003
    #8
  9. olwen

    Wipkip Guest

    Re: page with no .html - Ping brucie

    brucie wrote:
    >

    Where are your images at http://loser.brucies.com/

    --
    Duende
    ------------
    If a turtle doesn't have a shell, is he/she homeless or naked?
     
    Wipkip, Jul 19, 2003
    #9
  10. olwen

    brucie Guest

    brucie, Jul 19, 2003
    #10
  11. olwen

    Wipkip Guest

    Re: page with no .html - Ping brucie

    brucie wrote:
    > In post <Uq0Sa.683$>
    > Wipkip said...
    >
    >> Where are your images at http://loser.brucies.com/

    >
    > the http referer must be http://loser.brucies.com/for the images to
    > display. if you have a look at the http responses you'll see the
    > images return a 403 if its not.


    Ok. Norton firewall blocks my history. What's the php code to do that?

    --
    Duende
    ------------
    If a turtle doesn't have a shell, is he/she homeless or naked?
     
    Wipkip, Jul 19, 2003
    #11
  12. olwen

    brucie Guest

    Re: page with no .html - Ping brucie

    In post <MC1Sa.121$%>
    Wipkip said...

    >> the http referer must be http://loser.brucies.com/for the images to
    >> display. if you have a look at the http responses you'll see the
    >> images return a 403 if its not.


    > Ok. Norton firewall blocks my history. What's the php code to do that?


    i'm not using php, its just a .htaccess entry

    SetEnvIfNoCase Referer "^http://loser.brucies.com/" local_ref=1
    <FilesMatch "\.(gif|jpg|png)">
    Order Allow,Deny
    Allow from env=local_ref
    </FilesMatch>


    --
    brucie a. blackford. 19/July/2003 12:08:53 pm kilo.
    http://loser.brucies.com/
     
    brucie, Jul 19, 2003
    #12
  13. olwen

    Wipkip Guest

    Re: page with no .html - Ping brucie

    brucie wrote:
    > In post <MC1Sa.121$%>
    > Wipkip said...
    >
    >>> the http referer must be http://loser.brucies.com/for the images to
    >>> display. if you have a look at the http responses you'll see the
    >>> images return a 403 if its not.

    >
    >> Ok. Norton firewall blocks my history. What's the php code to do
    >> that?

    >
    > i'm not using php, its just a .htaccess entry
    >
    > SetEnvIfNoCase Referer "^http://loser.brucies.com/" local_ref=1
    > <FilesMatch "\.(gif|jpg|png)">
    > Order Allow,Deny
    > Allow from env=local_ref
    > </FilesMatch>


    Thanks Brucie.
    What's the difference between that &:

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^http://wipkip.us/.*$ [NC]
    RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]

    I had this hotlink protection setup on my site using cPanel & someone from AOL couldn't see any
    images. Was that just an AOL thing or was their history blocked?

    --
    Duende
     
    Wipkip, Jul 19, 2003
    #13
  14. olwen

    brucie Guest

    Re: page with no .html - Ping brucie

    In post <v42Sa.125$>
    Wipkip said...

    >> SetEnvIfNoCase Referer "^http://loser.brucies.com/" local_ref=1
    >> <FilesMatch "\.(gif|jpg|png)">
    >> Order Allow,Deny
    >> Allow from env=local_ref
    >> </FilesMatch>


    > What's the difference between that &:


    not much, just a different way to do it.

    > RewriteEngine on
    > RewriteCond %{HTTP_REFERER} !^http://wipkip.us/.*$ [NC]
    > RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]


    have a look at this for a comprehensive method:
    http://groups.google.com/groups?selm=

    > I had this hotlink protection setup on my site using cPanel & someone from AOL couldn't see any
    > images. Was that just an AOL thing or was their history blocked?


    you would need to find out if it is AOL in the first place or just the
    visitors setup. if it was AOL you would need to discover what, if
    anything AOL users return as the referer. i would say its the
    individuals settings rather than AOL not sending or sending a dodgy
    referer.

    --
    brucie a. blackford. 19/July/2003 12:36:42 pm kilo.
    http://loser.brucies.com/
     
    brucie, Jul 19, 2003
    #14
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Kamoski
    Replies:
    1
    Views:
    7,122
  2. Stu
    Replies:
    2
    Views:
    797
    Rob McAninch
    Apr 6, 2004
  3. Chuck
    Replies:
    0
    Views:
    267
    Chuck
    Jul 5, 2003
  4. Adam Akhtar
    Replies:
    9
    Views:
    534
    Florian Gilcher
    Aug 16, 2008
  5. Duke
    Replies:
    1
    Views:
    168
    Tom de Neef
    Apr 18, 2008
Loading...

Share This Page