page with no .html

O

olwen

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
 
D

Dylan Parry

olwen said:
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.
 
C

Chris Morris

Dylan Parry said:
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.
 
J

Jacqui or (maybe) Pete

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?
 
W

Wipkip

brucie said:
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?
 
B

brucie

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/[email protected]
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top