last day (14 days later) » 

6:49 AM
1
A: How to open a webpage in a site without appending html ?

Lea TanoOption1 Keep your file myPage.html in public_html you need to create a .htaccess in public_html and add this into the file: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.html [NC,L] Option 2 Make a folder calls myPage Rename file myPage.html to index.html M...

 
I tried option 2 but i'm getting "You don't have permission to access /support/.html on this server." I also tried by changing permission of index.html. but it doesn't work.
 
what is your URL?
 
www.nexogen.in/privacy
 
ok place an index.html file on privacy folder
 
I already placed a index.html file inside privacy folder....
 
6:49 AM
also change the permission on folder privacy to 755
 
still getting no where, change the privacy to 755 and also index.html to 755
 
hi
 
hello
 
lets work together
 
thnx for helping me :)
 
6:50 AM
did you created the .htaccess?
 
do i've to create .htaccess in privacy folder ?
 
no no
i am asking you
did you create the file on public_html?
 
yes i've created a .htaccess file in the root directory of my public_html folder and it was working fine
yes, i
 
ok
that is option 1
 
yep .. that was totally fine
but what is wrong with option 2
 
6:52 AM
in order to check option 2, please remove the content of .htaccess and save
 
wait a sec
 
or you can delete the file if you will
ok
 
i've updated the .htaccess file in public_html folder
 
uodate means you removed te content?
 
yes i removed the content
 
6:56 AM
cool
firstable are you having this issue locally or some shared hosting or vps?
 
i'm not using vps or shared hosting ...
 
local?
 
and what does locally means ?
 
XAMP? WAMPP?
 
hey
guess what it's working
 
6:58 AM
lol
 
I just removed the contents of .htaccess
 
ok
 
and it works ... bingo :)
 
exactly
 
thanx man.. !!
 
6:58 AM
that is why i was saying option 1 and option 2
you can not have both at the same time
 
can you please tell me how does .htaccess work ..
 
please upvote and accept my anwer :)
 
okes ... it was AND gate
 
sure
 
for sure man
 
6:59 AM
basically
the .htaccess will grab your url
^([^\.]+)$ This regular expression matches any number of characters, which are not slash /, followed by an optional trailing slash. If the match was found, it will rewrite the request to the second parameter: /$1.html, $1 means "Whatever was matched between the brackets", which in our case is all of the non-slash characters.
 
okes
 
got it?
you can do the same think with php extension
or any other extensions
i highly recommendyou to read this: httpd.apache.org/docs/2.2/mod/mod_rewrite.html
 
thanx buddy
 
you will need them for friendly urls
np good night
 
good morning :) in my timezone
 

last day (14 days later) »