I am trying to create friendly masked rewrites in SEO.htaccess. The htaccess file works fine on localhost and my personal server, but doesn't seem to work on GoDaddys servers. I know that this is already a problem, but it works for a client who decided to use Godaddy as his host.
The problem is that rewriting seems to result in a redirect showing the rewritten query string in the browser URL bar, not the internal one. eg.
Rule:
RewriteRule ^/?([a-zA-Z0-9-_/]*)$ /index.php?loadPage=$1&mode=cms [L,QSA]
Link: /images Redirecting to /images/?loadPage=images&mode=cms
this "should" remain as /images/ for the browser. I copied my short .htaccess below, the IP addresses changed for the development block
<Files .htaccess> deny from all </Files> Options -MultiViews +FollowSymlinks -Indexes RewriteEngine On RewriteBase / # Stop Old redirection from block below RewriteCond %{REQUEST_URI} "/old/" RewriteRule (.*) $1 [L] # Under construction Redirect RewriteCond %{REMOTE_ADDR} !^0.0.0.0 RewriteCond %{REQUEST_URI} !^/?old/ RewriteRule ^/?(.*) "/old/$1″ [L,QSA] #Admin utilities rewrite RewriteRule ^/?admin/?(.*)$ /index.php?loadPage=$1&mode=backend [L,QSA] #CMS/Frontend rewrites -- this one is failing RewriteRule ^\/?([a-zA-Z0-9-_]+)\/?$ /index.php?loadPage=$1&mode=cms [QSA,L]
The hint of a potential note is that the display URL is /images/?query_string , NOT index.php?query_string , so it does not perform a full redirect, although external requests get a 301 response from the page request.
source share