FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


htaccess





bdoneck
ive never edited my htaccess file before. does anyone know how i could get it to redirect or something similar so that www.mysite.com/(variable) goes to www.mysite.com?page=(variable)

Thanks
thnn
RewriteEngine on
RewriteRule www.mysite.com/(.*) www.mysite.com/?page=$1
bdoneck
when i add the to my htaccess it gives me a 403 error and i have no idea why
thnn
thats weird because a 403 error is a forbidden error.

what is the link to the site?
bdoneck
im trying it on my local server, using localhost/whatever as the test
Grimboy
Have you got mod_rewrite?
bdoneck
lol, good point i probably dont. how would i know this?
Grimboy
Well unless you build it yourself or got a non-standard build it's installed but not enabled (presumably for efficiancy). My advice to you it to have a look at http://www.tutorio.com/tutorial/enable-mod-rewrite-on-apache .
Simulator
http://www.workingwith.me.uk/articles/scripting/mod_rewrite/
I think that that is a better one
bdoneck
thanks the first tutorial got it working
Related topics
htaccess Password Protection
.htaccess tutorial
CANT UPLOAD .htaccess, .htpasswd, .header, .footer
[tutor] How to protect images without htaccess using PHP
.htaccess IP Blocking
Custom error pages using .htaccess
A Question For .htaccess
.htaccess
Can you use .htaccess?
.htaccess problem
htaccess files gone???
.htaccess i mod_rewrite
.htaccess .htpasswd
protecting a file with htaccess
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.