Jump to content

mod_rewrite static to anchor type url?


RonHouston

Recommended Posts

In the last three~four weeks I've been desperately trying to get this .htaccess thing to work, but never succeeded.
I'm trying to have couple of things done here:

If google lists anchor type URLs then all I want is to redirect all dynamic URLs to anchor type ones. ie all the index.php?query=string to /#query/string.
then to have a file exception on this mod_rewrite rule for a certain file type.

But since I've never seen google listing anchor type urls, I think I'll have to have these three things done.

- first is that it has to redirect all static to anchor type. ie: redirect all /query/string/ to /#query/string/
- second is to have to redirect all dynamic to static url
- third is to have a file exception on these mod_rewrite rules for a certain file type.

I keep on getting "500 Internal Server Error" when trying to get through the first step.

[code]RewriteEngine On
RewriteBase http://www.domain.com/temp/domain/

RewriteCond %{QUERY_STRING} ^folder\=([^&]+)$
RewriteRule ^$ /#folder/%1/ [R=301,L][/code]

Any help would be greatly appreciated.

Ron.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.