3

I'm new to sh404SEF, but I understand it is widely used. I host with HostGator.

I'm using sh404SEF primarily to generate search engine friendly URL's.

sh404SEF advertises that I can do this without modifying the .htaccess file, but while this might be the easiest approach, is it the best approach?

Assuming that I have no issue with having to modify the .htaccess file

  1. Should I make any modifications to it?
  2. What modifications should I make?
  3. What are the impact of those modifications?

1 Answer 1

3

1) Not really.

2) From a configuration perspective you don't need to change anything in the .htaccess file for proper and optimal functionality of sh404sef.

From an "SEO" perspective, there are some things I would recommend. Mainly ensure that you are properly redirecting non www to www (or vise versa) using this:

https://stackoverflow.com/questions/4159088/how-to-modify-htaccess-file-to-always-redirect-to-www

Make sure you add it below the RewriteEngine On line.

3) Redirects non-www URLs to www URLs as a 301 redirect. Gives some improved SEO juice so Google doesn't give SEO authority to more than one URL.

5
  • 1
    I would not recommend to use .htaccess to redirect non-www to www in case if you use sh404SEF. You can redirect non-www to www by going to Components > sh404SEF > Configurations > Advanced > Advanced Component Configuration. Use the dropdown here to redirect non-www to www
    – Gev Balyan
    Apr 22, 2014 at 18:06
  • 2
    I knew sh404 did this, but my feeling has been if it can be done at the server level via .htaccess I figured its better than doing it at the php level with sh404. Not sure if it really matters, but I've tended to prefer going directly to .htaccess since I felt it's executed sooner. Apr 22, 2014 at 18:38
  • 1
    Quick note: I think you're assuming the user is using the Joomla htaccess.txt renamed to .htaccess. sh404SEF actually can run without using the Joomla router htaccess.txt . If the asker is saying they are using the root HostGator htaccess file that doesn't actually include the mod rewrite code, then we've made a critically incorrect assumption.
    – Toni Marie
    Apr 22, 2014 at 18:55
  • @ I believe your approach, going directly to the .htaccess level will provide better performance and answers part 3 of the question. My concerns are that although sh404SEF might make things easier by by-passing the .htaccess, it's not necessarily the 'best way go' - these are the types of answers I'm looking for - so thank you!
    – NivF007
    Apr 25, 2014 at 1:56
  • @ToniMarie - I will look into the specific configuration of HostGator to check about mod rewrite code and see if I can provide some clarification on this.
    – NivF007
    Apr 25, 2014 at 1:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.