Forum Moderators: phranque
I've read some tutorials now I'm trying to get some results.
I've coded the following in my .htaccess file.....
Options +FollowSymLinks
RewriteEngine on
RewriteRule x(.*)-(.*)\.htm$ /index.php?SearchIndex=$1&Title=$2
.....and my URL looks like this.....
[wwWebmasterWorldebsite.co.uk...]
Problem is nothing is happening i.e. the mod-rewrite is not altering the URL.
I checked my server settings and found
Loaded Modules: mod_evasive, mod_security, mod_auth_passthrough, mod_log_bytes, mod_php4, mod_frontpage, mod_ssl, mod_setenvif, mod_so, mod_expires, mod_auth, mod_access, mod_rewrite, mod_alias, mod_userdir, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir, mod_autoindex, mod_include, mod_status, mod_negotiation, mod_mime, mod_log_config, mod_env, http_core
I'm sure there's a simple answer. Please help!
Thanks, Pete
and my URL looks like this:http://example.com/index.php?SearchIndex=X#*$!&Title=Yyyy
I assume that that is the desired 'output' URL. What does your 'input' URL look like?
I suspect something else is wrong, URL-wise, procedurally, or with your expectations. But your rule would be more efficient with a couple of tweaks:
RewriteRule x([^-]+)-([^.]+)\.htm$ /index.php?SearchIndex=$1&Title=$2 [L]
For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].
Jim
Synopsis:
Put static links on your pages, then rewrite those static links, when requested, to the script needed to serve your content.
Having done that, you can add more code to redirect the old dynamic links to the new static links, to acclerate the removal of the old dynamic links from search results, to recover any PageRank/LinkPop from those old links, to prevent duplicate-content problems, and to 'clean up' your log files and stats.
Jim
In a few days I'm going to attempt to do a 301 as I'm managing a site with 2 domains that point to the same site (same account even with webserver). I can access the htaccess through GoLive and hope all goes well - these forums have been a big help in getting me familiar with the procedure.