Questions tagged [rewrite]

Refers to URL rewriting, or the restructuring of a URL to improve readability and/or search engine optimization (SEO).

URL rewriting relates to the process by which the URL of a website can be restructured/masked from its relative path as dictated by its location in terms of directory and file structure, and replaced with a customized address string which when entered/browsed to, resolves to the same (original) content.

URL rewriting requires a rewrite engine, software located in a Web application framework running on a Web server that modifies a web URL's appearance.

Rewritten URLs (sometimes known as short, fancy URLs, search engine friendly - SEF URLs, or slugs) are used to provide shorter and more relevant-looking links to web pages. The technique adds a layer of abstraction between the files used to generate a web page and the URL that is presented to the outside world.

4045 questions
1
vote
2 answers

htaccess Rewrite Rule not working on certain pages

im having some difficulty with Rewrite Rules. My .htaccess looks like this: RewriteEngine On RewriteRule admin/add-category$ adm_add_category.php [NC] RewriteRule admin/categories-management$ adm_categories_management.php…
ThatGuy343
  • 2,194
  • 2
  • 23
  • 49
1
vote
1 answer

htaccess redirect for virtuemart

I've setup a virtuemart ecommerce. All ok with htaccess and redirect, store is in http://www.domainname.com/it/store/ But the "only" problem is it that both url are valid: http://www.domainname.com/it/store/article.html and (note absence of…
sineverba
  • 4,473
  • 6
  • 27
  • 52
1
vote
1 answer

Rewrite rules for a domain with folder and bluehost

I have a domain with bluehost.com and not able to get the rewrite rules working properly. Their support is not helpful! this is what I need. I have the domain "abc.com" and have the files inside "abc.com/v1" so I need http://abc.com/v1/about-us.php…
JDesigns
  • 2,174
  • 7
  • 24
  • 39
1
vote
1 answer

I need to hide directory from url using htaccess

I need to remove directories from my local website url: Current url : http://localhost/example/trunk/frontend/www Needed url : http://localhost/example/frontend I need to remove trunk and www folders from url without changing files (css, js,…
1
vote
2 answers

.htaccess rewrite url check if languages is set

I have index.php where it set the language with index.php?lang=de. English is the default language which I don't need to use index.php?lang=en When the language is set it use this condition in htaccess RewriteRule ^([a-zA-Z0-9\-_]+)/$…
zmeutz
  • 37
  • 2
  • 10
1
vote
1 answer

Unusual RewriteCond behavior

I've these lines in .htaccess file: RewriteCond %{HTTP_COOKIE} ^.*ddl=([^;]+);\sddc=([^;]+).*$ [NC] RewriteCond %1 =%2 RewriteRule .* index.php?ddc=%2&ddl=%1 [L] %{HTTP_COOKIE} conaitns ddl=123456; ddc=123456. When I go through a URL it doesn't…
revo
  • 43,830
  • 14
  • 67
  • 109
1
vote
1 answer

301 redirect for entire site except for subdomains

I have setup a sitewide 301 redirect in my .htaccess as follows RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^.* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] But I wanted to exclude subdomains (support, blog) from being included in…
Maverick
  • 61
  • 3
  • 10
1
vote
0 answers

Probably slash bug on rewrite rule

This 3 of all my rewrite rules RewriteRule ^.*-en-loire-atlantique-([0-9]+)/.*-a-.*-([0-9]+)$ /sortir21/index.php?com=liste-cat-lieux&t=$1&l=$2 [L] RewriteRule ^.*-en-loire-atlantique-([0-9]+)$ /sortir21/index.php?com=liste-cat-ville&t=$1…
bklups
  • 300
  • 1
  • 12
1
vote
1 answer

Rewrite sendevent.c from C to Java

In android, I use sendevent to simulation click and drag event. the code is: String[] events = new String[7]; events[0] = "sendevent /dev/input/event1 3 57 0"; events[1] = "sendevent /dev/input/event1 3 53 " + x1; events[2] = "sendevent…
Yhzhtk
  • 176
  • 1
  • 10
1
vote
1 answer

Rewrite sub folders to root with htaccess

Is it possible to rewrite sub dirs like www.mydomain.com/views/pages/contact.php to www.mydomain.com/contact.php What i've got so far is this. RewriteRule ^/(.+)$ /views/pages/$1 Unfortunately, this doesnt do the trick. RewriteRule ^p/(.+)$…
user2553340
1
vote
1 answer

How can keep my existing rewrite rules working with a WordPress install?

I had a pretty simple website that had some static pages, but also some dynamic pages that use rewrite rules to pull data in. For instance: RewriteRule ^phone-directory/([^/\.]+).htm$ number.php?for=$1 [L] So any urls like:…
James Wilson
  • 699
  • 1
  • 10
  • 23
1
vote
0 answers

ReWrite in web.config to go between mobile and desktop sites

I am finishing up a new mobile website to compliment the desktop version. Currently I have a rewrite rule in the web.config file on my desktop site that looks like so:
cardiac7
  • 483
  • 9
  • 25
1
vote
2 answers

Rewrite rules not working htaccess

I have the following htaccess rewrite rules RewriteRule ^shows-watch/(.*).html?$ show.php?name=$1 RewriteRule ^shows-watch/(.*)/season-(.*).html?$ show.php?name=$1&season=$2 RewriteRule ^shows-watch/(.*)/season-(.*)/episode-(.*).html?$…
Belgin Fish
  • 16,577
  • 39
  • 98
  • 128
1
vote
0 answers

ARR URL Rewrite Routing Through to Wrong URL

I have setup URL Rewrite and ARR in IIS and IIS to act as a proxy server for JBoss. In Jboss i have 3 application servers, called Server1, Server2, Server3. I've managed to get the the URLs rewritten correctly for the applications in server1.…
1
vote
1 answer

htaccess rewrite rule tweak

I have a website with HTTPS installed. I need to ensure all pages (except the ones that are intentionally HTTPS) are forced to show on non-https. The HTTPS is installed ONLY on domain-name.com/ssl-directory/what-ever-page-goes-here/ So, only the…
Andrej
  • 725
  • 2
  • 13
  • 33
1 2 3
99
100