![]() |
Web browser file extenstions
Hi,
I've been looking into hiding my web browser extentions as such http://www.mydomain.com/php-page/ without the need for .php or .html and if you try to add those extentions to "php-page" it will reply with page not found. Anyone know of this method, someone said it was a type of security. |
The only security that is possibly added is that nobody will know what programming language and or server you are using by telling through the file extension. But generally this isn’t primarily done for security but for SEO reasons and is commonly known as “pretty URLs” or “search engine friendly URLs”.
There are two ways to do it, one that requires a change in the server configuration or .htaccess file and one that doesn’t but makes file management a little more laborious. The second one goes like this: You create a dedicated directory for each page and put the actual HTML file as “index.html” (or index.php or whatever extension you have) in it. Browsers will always look for a file called index.* if no file name is provided. So the file structure would look like this: Code:
index.html – this is the site’s home pageFor the other – preferred – approach read this tutorial. |
Thanks, so I'm currently using the code below in a .htaccess file and still nothing works, it's strange because I would go to the link without the extention and shows the page without structure. Not sure what's wrong.
Code:
Options +FollowSymLinks |
What do you mean by “without structure”? Without styles? Do you have a link for us?
|
Yeah without style, no I do not it's local testing, what would be the "code" for rewriting my pages is what I have so far sufficient? Please give me your input.
|
Then please post your HTML code and tell us where your CSS file is located in the directory tree.
|
I thought you could help me edit my settings so far.
Code:
Options +FollowSymLinks |
I was going to approach this from the other way around, by looking at the paths generated by that rule and finding the issue in the CSS path. But if you really insist that someone just looks at your htaccess rule and tells you what’s wrong I can move the thread to the Apache Configuration forum.
Try commenting out the FollowSymLinks rule and see what happens. |
| All times are GMT +1. The time now is 03:25 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.