[HELP] .htaccess

Status
Not open for further replies.

Bazinga

Posting Freak
Aug 3, 2010
819
54
How could I set .htaccess so that any extension in a folder is hidden?

I tried this:

Code:
http://pastebin.com/ipM1wPUr

But it failed so any ideas?
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

...etc
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
If you do not have the file called .htaccess, you will need to create a new text file and save it as ".htaccess".

If you are creating the file from scratch, simply type the following line into the file, changing the url to the location of your custom page:

Code:
ErrorDocument 404 [URL]http://www.yoursite.com/custom_page.html[/URL]

Not gonna lie, that is nothing like what he asked for.
 
Status
Not open for further replies.

Users who are viewing this thread

Top