php file url rewrite without using mod rewrite

Lets say i have a website which have a php file like

mysite.com/blogs.php

i want the url to look like

mysite.com/blog

I know that we can use mod rewrite but is there any options available better than that??

I came up with something like creating folder named blog in the root directory, and then put a index.php file in that folder and we can call this file by the following url

mysite.com/blog

So here are my questions:

  1. What is the best way to rewrite or creating a fancy url?

  2. What is the security risk involved?

  3. Is there any performance issue to note?

Answers


remove the . use absolute path instead

<a href="/user.php">...</a>


Need Your Help

Hot reloading old Ant-based Java webapp

java ant eclipse-wtp hotdeploy

I have a web app that runs on Ant and I use Tomcat or JBoss to test it locally in Eclipse (but I can use something else). Are there any good ways for me to hot re-load my application? I'm hoping t...

Servlet - Force overwrite downloaded file

java jsf java-ee servlets jsf-2

How to change this code to force overwrite existing previously opened file saved on drive? It's part of servlet for opening pdf files on client side.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.