bradley525
asked on
htaccess URL Rewrite
I need to make my URL clean so that they look something like
http://www.mysite.com/new/about-us
is equal to
http://www.mysite.com//new/page.php?id=about-us
not really sure how to do this..
thanks
http://www.mysite.com/new/about-us
is equal to
http://www.mysite.com//new/page.php?id=about-us
not really sure how to do this..
thanks
ASKER
I added the htaccess file but I get a 404 error using
http://www.mysite.com/new/about-us
http://www.mysite.com/new/about-us
Do you have mod_rewrite enabled, and in which .htaccess file did you place the rule?
it has to be enabled in apache. Are you using a control panel? What level of access do you have to your server?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
got it working, since I am working in the folder "new" I do not need the "new/" in the code above, i just used
RewriteEngine On
RewriteRule ^new/([^/]+)$ page.php?id=$1
ASKER
This works perfect if you are in the root folder, if not just remove the "new/" and it will work...thanks
Open in new window