| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #3 (permalink) |
| Domains my Dominion Join Date: Aug 2005 Location: Web 1.0
Posts: 9,552
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | What you need is mod_rewrite instead.
__________________ NameNewsletter.com - free lists of available domain names ZoneFiles.net (beta) - ccTLD and gTLD droplists |
| |
| | #4 (permalink) |
| NamePros Regular Join Date: Feb 2007
Posts: 403
![]() ![]() | you need mode rewrite....you can use this Code: RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} -f [OR]
RewriteCond %{SCRIPT_FILENAME} -d
RewriteRule .* - [L]
RewriteRule ^index/([^/]+)\.html$ ./index.php?author=$1 [QSA,L] |
| |
| | #5 (permalink) | ||||
| NamePros Regular Join Date: Apr 2004 Location: NL
Posts: 808
![]() ![]() ![]() ![]() |
| ||||
| |
| | THREAD STARTER #6 (permalink) |
| NamePros Regular Join Date: Oct 2006 Location: Mars.
Posts: 439
![]() ![]() ![]() | Hitch, nice tool but I don't know exactly how to work with it! vinodkv, that code you wrote will rewrite to NAME.html instead of directory, what I specifically want is to URL: www.website.com/index.php?author=MyName To be rewrite as: www.website.com/MyName How to do it ? Thank you
__________________ :notme: |
| |
| | #7 (permalink) | ||||
| Senior Member Join Date: Dec 2006 Location: England
Posts: 1,568
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Code: RewriteEngine on RewriteRule ^([^/.]+)/?$ index.php?author=$1 [L] ????: NamePros.com http://www.namepros.com/programming/297796-htaccess-questions.html /? is used to let users add a forward slash at the end of the url, with or without it will work The [L] flag means if the rule is successful then do not check any more (optional) Matt | ||||
| |
| | #9 (permalink) | ||||
| Senior Member Join Date: Dec 2006 Location: England
Posts: 1,568
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Code: RewriteRule ^site/([^/.]+)/?$ index.php?author=$1 [L]
Last edited by Matthew.; 02-24-2007 at 12:47 PM.
| ||||
| |