Having a problem with adding a .htaccess to one of my sites, whether I leave it blank or use code from a working .htaccess from another site I'm getting the same error 500 and my website goes down.
Could anyone point me in the right direction as to where the problem may be? Seems to be the two differences between my sites working with .htaccess and the ones not - Do you need a public_html to have a .htaccess? Or is it to do with hosting? Or something else?
Related
I would like to prevent users from creating wildcard redirects on their websites to mine.
Is this possible? How would I go about doing this?
My site is in PHP. I am willing to add PHP code or edit my htaccess to make this possible.
Thank you for the assistance.
I've tried forcing a page refresh, but the nature of my website would cause an infinite loop to occur.
I have had a website for a couple of years, and this year I decided to update it completely. Most of the content is going to stay but there are some pages that will disappear and I'm adding some new ones. The whole site's design has changed though. When I launch this new site, is it required to create an .htaccess with 301 redirects file? Any help will be much appretiated.
Thanks!
Quite of a newbie question here but recently our Web Developer left our (small) company and has left us in a bind.
We recently (2 days ago) redirected our site to a newer and mobile friendly model and was working well for quite some time. For whatever reasons management deemed they needed to roll back the site to its original model and the site is breaking whenever you type in http://www.example.com. However, https:// works perfectly fine, and it seems like it has something to do with the htaccess file -- but being just the project manager, coding comes second in terms of skill.
If it helps our site is www.mauriprosailing.com -- currently still trying to figure out why the "www" and "http" is breaking the site.
If needed I can post a .txt of our htaccess if that helps.
I appreciate all the help and apologize if this was too broad of a question!
Solution: Granted this may not apply to everyone -- but the problem was not within the htaccess file but with caching of the server. The server was not pulling the right the .css file therefore causing an "explosion" of our site and I found that purging all of cached files did the trick.
I have been using the following in the root of my hosting with (123-reg) for sometime now i have since moved to Godaddy and the rules not longer seem to work. I have contacted their support and they said that they follow the defaults for linux mod-rewrite rules and they believe there is a problem with my scripting...?
here is what i am using:
RewriteEngine On
RewriteRule ^fishing/$ fishing.php [L]
I have alot more rules within .htaccess but will pick this one just as an example.
When i was with 123-reg i could simply type in http://domain.com/fishing and it would load the fishing.php file.
On godaddy this goes straight to 404. Can anyone see anything obvious going on here?
For info: It works fine if i type in the full path: http://domain.com/fishing.php but this is not what i want.
Also can anyone confirm that this is a standard rewrite rule and should work with the defaults of apache mod-rewrite rules?
Turns out for some reason you have to add:
Options -Multiviews
to your .htaccess file for it to work.
Would be helpful if the techs at GoDaddy knew this information though. I have seen this on many forums on the internet about a similar problem with godaddy. Hope this helps someone else.
Hey folks, I'm migrating a website over a to new CMS with a different URL structure, I'd like to have users redirect if a specific part of the link is missing. So if the user goes to www.domain.com/articles/name_of_article it'll take them to the old site, however if they go to www.domain.com/ it'll forward them to the subdirectory http://beta.domain.com
So what I'm trying to accomplish is to leave the old URLs active as to not lose traffic from old links since migrating those links is impossible because of how the old CMS was coded..but prompt the user to move over to the new site when they land on those pages.
how can this be accomplished via htaccess, any tips will be greatly appreciated?
Regards and thank you for your help!
RewriteEngine on
RedirectMatch ^/$ http://beta.domain.com/
did it
...The answer was a lot simpler than the question hah