djcanaydia Posted December 11, 2008 Share Posted December 11, 2008 Hello, i have been having coding trouble with a .htaccess code, i am not sure what type of code it is cuz im not great at this stuff but i figured it out once before but i switched hosts and now its gone wrong. the mod_rewrite uses the code from htaccess to view ppl profiles such as website.com/username whenever i go to upload the current code the script gives me to put in the .htaccess i get a redirect loop. Here is the code. RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-F RewriteRule ^([-_!*$@~:.a-zA-Z0-9]+)$ http://hardbassbeats.com/profile.php?username=$1 Here is the website www.hardbassbeats.com/index.php , if u click on a users profile u can see what i mean. (I do not have the .htaccess file inside the web host right now. if i do the whole site no matter what page u visit u just get a redirect loop) If this is the wrong section for this i am sorry but i could not find a better category. All help is appreciated. Thanks in advance. -Dj Canaydia. Quote Link to comment https://forums.phpfreaks.com/topic/136445-coding/ Share on other sites More sharing options...
Maq Posted December 11, 2008 Share Posted December 11, 2008 Maybe in the mod_rewrite section? Quote Link to comment https://forums.phpfreaks.com/topic/136445-coding/#findComment-712150 Share on other sites More sharing options...
djcanaydia Posted December 11, 2008 Author Share Posted December 11, 2008 The script that is used told me to do that. Take the code, stick it in the .htaccess file and put it in the main directory of the script. I have done that many different ways and get a redirect loop every time, im sure it can be fixed in the mod_rewrite but ive heard alot about it and from what i have heard, either u mess up the first time and mess up your site or fall in love with it from the first time u use it. Im not sure what exactly mod_rewrite does and such so i would rather not just randomly do stuff but came to a nice forum to get some help. Quote Link to comment https://forums.phpfreaks.com/topic/136445-coding/#findComment-712240 Share on other sites More sharing options...
Maq Posted December 11, 2008 Share Posted December 11, 2008 The script that is used told me to do that. Take the code, stick it in the .htaccess file and put it in the main directory of the script. I have done that many different ways and get a redirect loop every time, im sure it can be fixed in the mod_rewrite but ive heard alot about it and from what i have heard, either u mess up the first time and mess up your site or fall in love with it from the first time u use it. Im not sure what exactly mod_rewrite does and such so i would rather not just randomly do stuff but came to a nice forum to get some help. I understand that. All I meant was that you'll have better feedback and help if you move this to the mod_rewrite section. I linked it in my last post. Quote Link to comment https://forums.phpfreaks.com/topic/136445-coding/#findComment-712242 Share on other sites More sharing options...
djcanaydia Posted December 12, 2008 Author Share Posted December 12, 2008 Ok im just guessing someone has moved it here cuz it seems to be in the mod_rewrite section now. ty, does anybody know how i could possibly fix this issue? Quote Link to comment https://forums.phpfreaks.com/topic/136445-coding/#findComment-713310 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.