Hi here i will explain some URL rewriting magic using .htaccess file.
1)Rewriting user.php?id=12 to user-12.html
It is a simple redirection in which .php extension is hidden from the browser’s address bar and dynamic url (containing “?” character) is converted into a static URL.
RewriteEngine on
RewriteRule ^user-([0-9]+)\.html$ user.php?id=$1
2) Rewriting yoursite.com/user.php?username=xyz to yoursite.com/xyz
Have you checked zorpia.com.If you type http://zorpia.com/roshanbh233 in browser you can see my profile over there. If you want to do the same kind of redirection i.e http://yoursite.com/xyz to http://yoursite.com/user.php?username=xyz then you can add the following code to the .htaccess file.
RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)$ user.php?username=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ user.php?username=$1
Incoming search terms:
- Permission denied: AH00072 (8)
- url rewriting in php tutorial (4)
- url hiding in address bar htaccess (3)
- Rewriting yoursite com/user php?username=xyz to yoursite com/xyz (3)
- url rewrite in php example (3)
- basic rewriting example (2)
- how to rewrite address bar url using htaccess (2)
- url rewrite in php using htaccess (1)
- url rewrite sharp (1)
- url rewrite tutorials php (1)
- url rewrite dynamic based on id htaccess (1)
- user php for htaccess file to redirect xyz com/user (1)
- tutorial url rewrite php htaccess mysql (1)
- load time append url rewrite using javascript in jsp (1)
- rewriting yoursite com/user php?username=xyz (1)
- rewriting url c# (1)
- rewriting url address in javascript (1)
- rewriting address in jsp (1)
- RewriteRule sharp character in url (1)
- url rewriting dynamic example in c# (1)
- url rewriting for jsp in htaccess (1)
- url rewriting in htaccess c# (1)
- url rewriting with php (1)
- url rewriting with javascript (1)
- url rewriting tutorial complete (1)
- url rewriting through htaccess (1)
- url rewriting php tutorial (1)
- url rewriting javascript example (1)
- url rewriting interview questions php (1)
- url rewriting in php using htaccess example (1)
- url rewriting in php using htaccess (1)
- url rewriting in php using / with examples (1)
- url rewriting in php user names (1)
- url rewriting in php example (1)
- url rewriting in jsp with htaccess (1)
- url rewriting in javascript (1)
- url rewriting in htaccess video tutorial (1)
- rewrite url in wordpress dynamically using htaccess (1)
- Rewrite the URL in browser using javascript (1)
- rewrite condition for rewriting yoursite com/user php?username=xyz to yoursite com/xyz (1)
You will also be interested in ,
- Speed up wordpress using .htaccess part 1
- Apache AddHandler application/x-httpd-php not working?
- How to run jsp in xampp?
- Disable the TRACE and TRACK For More Security
- ScriptAlias and Alias in httpd.conf at a glance
- Custom Error Pages Using .htaccess
- Import large files in mysql using PhpMyAdmin
- IE compatibility view force Internet Explorer to use Internet Explorer 7 rendering mode
- Adding apache handlers in cpanel
- How To Avoid 404 Error Pages Easily and Reliably


how’re you doing guys?
Amazing !!!!
Hello all
I am new to this board but this is superbbbbbbbbbbbbb
Hello all
I am new to this board, a good one.