Questions tagged [rewrite]

URL Rewriting maps an incoming URL to a modified URL, so that the request is processes as if the original request was made to the modified URL. This is often used to provide more search engine friendly URLs.

2129 questions
2
votes
1 answer

Rewrite everything with the new domain name (including subdomains)

I want simple to rewrite everthing from OLD.COM to NEW.COM including subdomains and stuff - whatever user types in should just be replaced with NEW.COM and the rest of it stays as is. I tried this but it's not working for subdomains. Options…
Bob
  • 21
1
vote
4 answers

How many rewrite rules should I expect to manage?

I'm dealing with a hosting team that is fairly skittish of managing many rewrite rules. What are your experiences with the number of rules your sites are currently managing? I can see dozens (if not more) coming up as the site grows and contracts…
0
votes
2 answers

RewriteRule Irrespective of Trailing Slash in .htaccess

I want to redirect URLs irrespective of trailing slashes. The reason is because my site enforces trailing slashes by default; if an internal link is missing the trailing slash then I have a redirect chain ( /test -> /test/ -> /go-here/). I've…
Ryan Dorn
  • 101
0
votes
2 answers

IIS URl Rewrite working inconsistently?

I'm having some oddness with the URL rewriting in IIS 7. Here's my Web.config (below). You'll see "imported rule 3," which grabs attempts to access /sitemap.xml and redirects them to /sitemap/index. That rule works great. Right below it is imported…
Don Jones
  • 170
  • 6
0
votes
1 answer

rewriterule to redirect

I want to redirect test.example.com/cgi-bin/abc.sh to test1.abc.com/cgi-bin/abc.sh, but it is not redirecting. My rewrite rule is: RewriteEngine On RewriteRule (.*) http://test1.abc.com/$1 [R=301,L] Redirecting test.example.com/abc to…
sp123
  • 23
0
votes
1 answer

Plus sign ( + ) in a rewrite rule (.HTACCESS on Linux Server)

i've this snippet, but it doesn't works. Obviously is that plus sign + tha must be escape ? RewriteCond %{QUERY_STRING} ^orderby=position&controller=search&orderway=desc&search_query=t+max$ RewriteRule ^it/cerca$…
0
votes
1 answer

Is it possible to to randomly redirect users using IIS URLRewrite?

If I would like to randonly redirect users to different parts of the page to conduct testing is it possible to do so with rewrite rules and in particular with IIS URL Rewrite tool?
0
votes
1 answer

SSL force URL Rewrite

I'm trying to force a specific URL to use HTTPS, but the problem is that all the links in that page would point to HTTPS of other pages as well. So, I was thinking about updating my virual host file like this. #Rewrite urls…
Jon Doe
  • 111
  • 1
0
votes
1 answer

modrewrite how to achieve the rewrite

I am struggling to achieve this simple thing... I have some static pages which should be like www.domain.com/profile etc.. The problem is how to write the rewrite rules in order to .. There would be some fixed rewrites like /home I…
GorillaApe
  • 1,379
0
votes
0 answers

Apache URL Rewrite Rule

I'm trying to configure the rewrite rules for my application, my requirement are /aaa/bbb/ccc/ddd/ -> ./index.php?aaa=$1&bbb=$2&ccc=$3&ddd=$4 /aaa/bbb/ccc/ddd -> ./index.php?aaa=$1&bbb=$2&ccc=$3&ddd=$4 /aaa/bbb/ccc/ ->…
TOM
  • 1
-2
votes
1 answer

.htaccess rule not working

This is my .htaccess code ... the first condition is working and the other one is not RewriteEngine On RewriteRule ^([\w-]+)/?$ Page.php?PageID=$1 [L] # Process parrots RewriteRule ^([\w-]+)/?$ Product.php?ProductID=$1 [L] #…
-3
votes
2 answers

How do I redirect .php pages to .html pages?

Possible Duplicate: Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask? I have a dynamic website, so all the pages are in .php, but I want to show an address ending in .html on address bar, such as:…