gabearnold
gabearnold

Reputation: 592

What is causing my site to load and add "#" at the end?

I think there might be something in my .htaccess file that is causing my page to load and then "bounce" back to the top adding # at the end of my domain, like this: example.com/#

Here is my htaccess file:

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

# Start Category Redirects

Redirect permanent /check-out-this-page-tration http://example.com/this-page/

Redirect permanent /rewards http://example.com/example-reward-coupons-page/

Redirect permanent /p-photo-entries http://example.com/2012-contest-photos/


# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

# Or, compress certain file types by extension:
<files *.html>
SetOutputFilter DEFLATE
</files>


# BEGIN WordPress
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule . index.php [L]

# END WordPress

Any ideas on what I should remove or change?

Upvotes: 0

Views: 37

Answers (1)

Jon Lin
Jon Lin

Reputation: 143906

URL fragments are used by the client (a web browser) to help determine how to handle the content that it's trying to display.

This can be anchors to jump to a certain part of a page, or used by javascript to send information between other scripts. This is not your htaccess file as fragments are never sent to the server (where your htaccess file lives).

Try selectively removing javascript (especially scripts that you load from 3rd party sites that share links like "Add To Any"), otherwise make sure you have no links in your content that look like this:

some/path/file.html#

Upvotes: 1

Related Questions