So, here’s an interesting problem that of course, just “happened” all on it’s own about three days ago. In short, mod rewrite has been working for almost a year, and without any changes, has stopped working for certain rules within the .htaccess file. After multiple phone support sessions with GoDaddy, they can’t find anything wrong. See if you can help me out.
I have hosting with Godaddy for my website sticktacular.com. More importantly though is that my site yourprofolio.com is hosted on this sticktacular.com within the folder YourProFolio/. (So, “http://yourprofolio.com/index.php” is the same thing as “http://sticktacular.com/YourProFolio/index.php”)
I use a .htaccess file within this YourProFolio/ folder which makes “pretty” little urls using mod rewrite. The “…/” in front of my paths is because of the sticktacular.com/YourProFolio hosting with the domain being yourprofolio.com in case that is confusing. Here’s an abbreviated version of my .htaccess file to show you examples of what’s working and not working:
RewriteEngine on
RewriteRule ^features$ ../features.php [NC] [L]
RewriteRule ^support$ ../support.php [NC] [L]
RewriteRule ^([0-9a-zA-Z_-]+)$ ../ProFolio/index.php?user=$1 [NC] [L]
RewriteRule ^([0-9a-zA-Z_-]*)$ ../index.php [NC] [L]
AddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4
Here’s how my site’s set up on the sticktacular.com hosting:
sticktacular.com
/Root Directory
-index.php
/YourProFolio
-.htaccess
-index.php
-features.php
-support.php
/ProFolio
-index.php
Now, here’s the problem: when I go to yourprofolio.com, up comes the index.php file, which is good and that’s how it should be just like on basically any other site. But, when you click on a link, say, “Features” (which points to “http://yourprofolio.com/features”, which as you see in the .htaccess file, should show the page features.php, it doesn’t work! It comes up with an “Oops! This link appears to be broken” kind of page in my browser.
Now, where it gets even more curious, when you go to “http://yourprofolio.com/test” or “http://yourprofolio.com/zachkrasner” or any other link not specified in my .htaccess file, it should, and does, as according to my RewriteRule, brings up the the page “http://yourprofolio.com/ProFolio/index.php?user=test” (or index.php?user=zachkrasner or whatever link you’re going to). This works as it should. The reason why it’s interesting is because it seems to be working when the .htaccess points to a different directory other than the one in which it is located.
This is “all of a sudden” (I know, I know… I probably did something…even though I really don’t think I did) started happening across with all my .htaccess files in different directories in my sticktacular.com hosting about 3 days ago.
Does this seem familiar to anyone? Any ideas why this is happening? I have paying users using my site so any help at all is more appreciated than you can imagine! Thanks, and if anything is confusing, please ask! I will be online for the next couple hours and constantly checking back.