How to get .htaccess and mod_rewrite working on Godaddy Hosting

I need help with it…

i have the url
http://www.youthlaxco.com/region/index.php?pg=team

i want to change it to
http://www.youthlaxco.com/region/team

how do i set it up in directory and php file so i can display correctly.

not using any blog software/files.
BibbisAsked:
Who is Participating?
 
BibbisAuthor Commented:
i need to know how to write the .htaccess file.......

converting the index.php?pg=name => name/
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
ee_reachCommented:
0
 
BibbisAuthor Commented:
Im on godaddy. so its frustrating to figure out this crap due to the delay. which i have no idea how it takes.
0
 
ee_reachConnect With a Mentor Commented:
I am a godaddy reseller.  What I often do when I want to get around delays is give them a call and ask them to walk me through an example of whatever I am trying to do.  

So I would suggest that you read through the very first example I provided, and think about how you might implement that if you were to try to do it yourself.  Then I would call godaddy tech support and tell that what you want to do and ask them to walk you through the first one so you can make sure you have it right.  They can often push through things right away that we otherwise have to wait for.

Hope this helps!
0
 
BibbisAuthor Commented:
im stumped. some how when i type in http://www.youthlaxco.com/team it reads it correctly.

i want to change the url from http://www.youthlaxco.com/?pg=team   to      http://www.youthlaxco.com/team/

I going to try couple more things with it.
0
 
BibbisAuthor Commented:
this is an final step in the project I'm working on.
0
 
BibbisAuthor Commented:
now its not working ===== http://www.youthlaxco.com/team ======
0
 
BibbisAuthor Commented:
now its working ===== http://www.youthlaxco.com/team ======

RewriteRule ^([^/\.]+)/?$ /?pg=$1 [L]
0
 
BibbisAuthor Commented:
I have got it to work with the following rule:

http://www.youthlaxco.com/team == http://www.youthlaxco.com/index.php?pg=team == http://www.youthlaxco.com/?pg=team

RewriteRule ^([^/\.]+)/?$ /?pg=$1 [L]


I want a conditioning rule for the following
=====

http://www.youthlaxco.com/index.php?pg=index

or

http://www.youthlaxco.com/?pg=index

======
0
 
BibbisAuthor Commented:
====
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^pg/([^/\.]+)/?$ http://www.youthlaxco.com/index.php?pg=$1
RewriteRule ^pg/([^/\.]+)/?$ http://www.youthlaxco.com/?pg=$1 
====

http://www.youthlaxco.com/pg/team/  ======> http://www.youthlaxco.com/index.php?pg=team

i want it the other way around
0
 
BibbisAuthor Commented:
The other problem now is /?pg=VARIABLE
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.