Announcement

Collapse
No announcement yet.

Help with .htaccess file.

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with .htaccess file.

    Hello,

    I need help with my .htaccess file, or at least I think I do and I am willing to pay you for the help. PayPal preferred, I need a receipt!

    Here is the fist bit of code presently being used without the many 301 redirects I have in place:

    DirectoryIndex cleaning-services.html

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^wbjanitorial.ca
    RewriteRule (.*) http://www.wbjanitorial.ca/$1 [R=301,L]

    RewriteRule ^cleaning-services\.html$ http://www.wbjanitorial.ca/ [L,R=301]

    My index page or homepage is wbjanitorial.ca/cleaning-services.html. The code above is working perfectly but does not show the "cleaning-services.html" in the address bar. I would like the full URL to show.

    I'll explain why in case the effort would be a waste of time for my purposes.

    I have a local snippet and a review snippet on all the webpages. In google search the review rating is workng on all the pages that are indexed so far except for the homepage or index page. I believe this may be due to the fact that the "cleaning-services.html" is currently not visible.

    I've tried everything I know and can't seem to get the "cleaning-services.html" to show without creating a potential duplicate content issue. I can get one or the other (www or non www) to point to 'cleaning-services.html" but not both!!

    If anyone can fix this for me, I would love to hear from you. Or, if i'm wasting my time and google does not accept snippets on an index page, I would like to know as well.

    I'm presently on page 2 for most of my search terms and would like to start using Vodahits's services.

    Thanks for your time,

    Ward

  • #2
    Re: Help with .htaccess file.

    I figured out the solution for my problem. It was actually staring me in the face the whole time. I feel a little stupid for asking the question. Regardless, here is the solution in case anyone else could use an answer.



    The solution is actually in this rewrite code from above:

    RewriteRule ^cleaning-services\.html$ http://www.wbjanitorial.ca/ [L,R=301]

    For the directory index (cleaning-services.html) to be shown in the address bar, the code should be as follows:

    RewriteRule ^$ http://www.wbjanitorial.ca/cleaning-services.html [L,R=301]

    Thats it!!

    Ward!!

    Comment

    Working...
    X