Anyone willing to spoonfeed me a redirect I need? Mod_rewrite is just to complex to easily figure it out for a one-time rewrite . I've taken over mozdex.com, which provides free open source search feeds. There's a bunch of people using the feed on an old URL or two. I need to redirect their search traffic over to the current api so that their websites aren't all broken (no way of contacting these people to ask them to move, so I need to do it for them). There are two URL's that are being used, difference of only a slash: ww.domain.com/opensearch/?querystring www.domain.com/opensearch?querystring I need to permanently move these two strings to: www.domain.com/open.jsp?querystring Help?
domain.com/.htaccess Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^opensearch/?([^.]+)$ http://www.domain.com/open.jsp?$1 [R=301,L]
Thank you *very* much, I really appreciate that. It didn't quite work, but I think it's close enough that I can figure it out.
Hi guys, im kinda new to SEO and mod_rewrite and i need help with my apache server in my computer, i've uncommented the ff: LoadModule rewrite_module modules/mod_rewrite.so and AddModule mod_rewrite.c then i wrote this on the .htaccess file: Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^index.shtml$ index.php [L] i have the index.php file in http://localhost/samples/ directory but once i open http://localhost/samples/index.shtml , the browser displays a 404 Not Found Error. Am i missing something here? Thanks in advance =)
Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^samples/index.shtml$ samples/index.php [L] if it's at domain.com/.htaccess And change http://localhost to an actual URL!
oh i see =) i asked you how to change the http://localhost to http://www.domain.com because i thought there was a way to reconfigure apache settings so that it would display http://www.domain.com without being online hehehe. well anyway, everything seem well as of the moment. Thanks a lot Nintendo. =)
Was using the sample on this post to attempt t solve a rewrite issue but it's throwing an Internal Server Errror. What we need to do is take something like: ...domain.com/query1/query2/web-page.html?12345 (or, ?id=12345 even) and have it go to: ...domain.com/index.php?a=query1&b=query2&id=12345 Here's the .htaccess snippet for the rewrite rule that throws the error: RewriteRule ^action/([0-9a-z/-]+.html?([^.]+) /index.php?a=display&b=$1&id=$2 [R=301,L] There could be different numbers of /a/b/c depth too, and ends in ?12345 or ?id=12345
Get rid of the ? in the final URL, and to make it look more like a normaL URL, move the number before .html.