- Joined
- Jun 8, 2007
- Messages
- 1,961
- Reaction score
- 475
Edit: FIXED!
Hey, I have a .htaccess file in the root directory of my website.
It's job is to grab the request: http://www.avsbest.com/Spence.html
and display the data from:
http://www.avsbest.com/profile/profile.php?username=Spence
What it does:
When I click a link to http://www.avsbest.com/Spence.html, it just redirects to http://www.avsbest.com/profile/profile.php?username=Spence
, and shows the whole URL in the address bar instead of the smaller, easier one I want to display.
Here's the code: (this will help other ppl too I think)
Is that what it's supposed to do? Because I've been to other sites where it actually displays the requested URL.. (example: avsbest.com/Spence.html)
Maybe go there and see that it's kind of wacky :scratch:
Hey, I have a .htaccess file in the root directory of my website.
It's job is to grab the request: http://www.avsbest.com/Spence.html
and display the data from:
http://www.avsbest.com/profile/profile.php?username=Spence
What it does:
When I click a link to http://www.avsbest.com/Spence.html, it just redirects to http://www.avsbest.com/profile/profile.php?username=Spence
, and shows the whole URL in the address bar instead of the smaller, easier one I want to display.
Here's the code: (this will help other ppl too I think)
Code:
AddType x-mapp-php4 .html .htm
# Example for a rewrite rule:
# (turns http://domain.com/xyz.html into http://domain.com/profile/profile.php?xyz)
#
#Options +Indexes
RewriteEngine on
RewriteBase /
RewriteRule ^([a-zA-Z0-9-]+)\.html$ profile/profile.php?username=$1 [R,L]
Is that what it's supposed to do? Because I've been to other sites where it actually displays the requested URL.. (example: avsbest.com/Spence.html)
Maybe go there and see that it's kind of wacky :scratch:
Last edited: