A URL rewrite engine is software that modifies a web URL's appearance (URL rewriting). Rewritten URLs (sometimes known as short, fancy URLs, or search engine friendly - SEF) are used to provide shorter and more relevant-looking links to web pages. The technique adds a degree of separation between ...

learn more… | top users | synonyms (1)

0
votes
1answer
77 views

URL rewrite from www.domain.com/sudirectory to http://domain.com/subdirectory

I need a solution for the following problem: I use a CMS and want the backend only be available at http://domain.com/backend and not at http://www.domain.com/backend. How do I have to change my ...
1
vote
1answer
31 views

301 redirect + RewriteRule not working together?

I am using a 301 redirect to redirect a page to another page in the same website, which uses RewriteRule to hide the PHP variables in a friendly URL. My redirection code in .htaccess: Redirect 301 ...
1
vote
1answer
22 views

Rewrite and virtual hosts for moving subdomains to folder-like requests

I am administering a website that previously had mini-sites set up for various physical locations using sub-domains (city1.site.com, town2.site.com, etc.) and I now need to disable these mini-sites. ...
1
vote
1answer
127 views

Are there any possible pitfalls/issues that can arise from URL rewrites?

I'm in the process of move a website for a client, utilizing a new theme. Usually this is straightforward enough but some of the base category URLs they use are mess and they would also like to be ...
-1
votes
0answers
22 views

Redirect / rewrite and masking PORT

I have a Windows Server 2012 R2 serving as my DNS, DHCP and employee portal website for my organization (www.mycompany.com). Additionally I have Oracle applications that are installed on Linux ...
1
vote
1answer
26 views

Apache URL redirection not working with mod_rewrite

I want to redirect the URL: http://example.com/site to http://example.com/~username/site I have the following in my httpd.conf file: RewriteEngine on RewriteRule ^/site/(.*) /~username/site/$1 ...
0
votes
1answer
13 views

Redirect blog archive into certain format

I asked the question in WPSE before, but the answer I got so far is a complicated one. I'm actually looking for a .htaccess way. Here's what the scenario is: My blog archive URLs were like: ...
0
votes
1answer
33 views

Google still has record of my old site URL - what to do?

I had a blog site, i.e. http://example2.com, then I bought a new domain, i.e. http://example.com and 301 permanent redirected example2.com into example.com. But when I get into the Google Webmaster ...
2
votes
1answer
149 views

Using .htaccess, can you hide the true URL?

So I have a web hotel with 1 main website http://www.myrootsite.com/ and a few websites in subdirectories, in a folder called projects. I have domain names pointing to the subdirectories, but ...
0
votes
1answer
14 views

Apache rewrite to other domain and add get parameters?

I want to rewrite a domain to another domain and add get parameters using Apache's mod_rewrite, redirect or similar. So: www.domain.com -> www.otherdomain.com/?param1=value1&param2=value2 ...
1
vote
2answers
703 views

How to handle CNAME host redirect to virtual directory?

I have an internal website and virtual directory http://server2012/logs. I created a CNAME on my DNS server as LOGS -> server2012. I would like to set it up so that http://LOGS redirects to ...
3
votes
4answers
575 views

Which URL is SEO friendly?

I have to choose between two usernames, one comprises of just my first name i.e. http://example.com/john while the other comprises of full name i.e. http://example.com/johnsmith. Which of the above ...
1
vote
2answers
103 views

Redirecting requests to a subfolder

We have multiple WordPress installations on our IIS7 (Windows Server 2008) Server as follows: http://www.example.com/site_one http://www.example.com/site_two http://www.example.com/site_three These ...
2
votes
5answers
182 views

Apache URL rewriting not working

All .php files are rewritted before doing the below rewriting: test.php => test foo.php => foo I want to rewrite this URL http://www.testdomain.com/test?name=john&id=2&nick=doe to ...
18
votes
5answers
2k views

Why extensions are hidden in URL?

I know HTML and CSS like a mid level still not a pro. Many times I see in URL extensions are hidden (e.g. .html, .php) but everybody is not doing this. Why do they do that? Is it for security, or for ...
0
votes
0answers
18 views

Apache/ISS equivalent

I've always used Apache for all my web development work and I'm struggling to get my head around IIS. I've got an API that re-routes all requests to one particular file: 'api.php', how would I do the ...
0
votes
1answer
26 views

Masking / mapping URL's with .htaccess

I've recently been trying to come up with a way of masking the visible URL in the browser (so not 301 redirecting) and still show the same content as the original URL. Here is the scenario... ...
0
votes
0answers
14 views

Change Subdomain follow IP Country?

I have something don't know to do it. I want to config domain when the User go to my website, system is catching IP Country of user and auto change my subdomain from www.mysite.com/index.aspx to ...
1
vote
2answers
476 views

Remove .php and id from URL and replace with slash

I have tried lots of URL rewrite rules in .htaccess but I am stuck now. I have to change this URL: products.php?id=31 to products/31 I have used: Options +FollowSymLinks -MultiViews ...
0
votes
1answer
112 views

URL rewrite to another folder and file for specific requests

I have following directory structure on my local LAMP: www basic app router.php public index.html .htaccess and I can access my index page with localhost/basic/public/ and I am not using ...
2
votes
1answer
99 views

Apache rewrite rule to add a directory in front of a file

I have an HTML page in my root directory, and when someone clicks it I'd like there to be a directory before the file name, that doesn't exist. For example, instead of just being able to access: ...
1
vote
0answers
26 views

Geolocalization and Redirection

I have a multilanguage website. My project was to add the Geolocalization so base on the country that open the site to redirect in the specific url with the right language. The structure of the ...
1
vote
2answers
109 views

Can I have tracking parameters immediately after a forward slash /?

I would like to start redirecting all /index.php pageviews to / to clean up GA data and otherwise simplify URL hits. Does anyone foresee this causing any problem when using tracking parameters? E.g. ...
0
votes
1answer
74 views

How to map requests to an external directory

I have a directory/application that is located outside of the web root directory of my site. Say the site is here: /var/www/site/htdocs/ And the external app is located here: ...
2
votes
1answer
66 views

Changing file extensions in URIs - Server Error after Apache upgrade

Please can anyone help to identify flaw or incompatibility in .htaccess code causing server error? In the process of changing over from static to dynamic website, I had to maintain some static files ...
5
votes
2answers
489 views

I am changing my file extensions in URLs, how to keep my good SEO results?

We have a website with good SEO results. For design reasons I have to update the design and I have to change file names from .html to .php. But I keep my domain name! What should I do in order to ...
0
votes
1answer
17 views

How can I rewrite to my .htaccess in PHP? [duplicate]

How to rewrite my URL from http://www.mysite.com/listingsecond.php?ID=1 to http://www.mysite.com/listingsecond? How can I rewrite to my .htaccess in PHP to do this?
2
votes
2answers
59 views

Google Analytics Campaigns - cleanup URL after arriving to webpage?

After visitor lands to my webpage using campaign url: http://www.mydomain.com?utm_source=signature&utm_medium=email&utm_campaign=myname Is it possible to do a rewrite to ...
1
vote
1answer
76 views

What is occurring in this .htaccess file in regards to rewriting to clean URLs?

I have the following code in my .htaccess file, which is working fine and using "pretty" permalinks to reroute everything back to /index.php, and using $_GET values to serve customized content based ...
5
votes
5answers
1k views

WWW.yoursite.com or HTTP://yoursite.com which one is futureproof?

http://yoursite.com www.yoursite.com http://www.yoursite.com yoursite.com Which of these would you choose as your favourite to work with, if you were to make a site for 2011 and beyond, which ...
2
votes
1answer
31 views

What is the precise term for serving internal URLs to external ones?

Consider URLs to a public API: https://api.example.com/items https://api.example.com/add https://api.example.com/remove ... Internally, the calls are being served from local URLs, for example: ...
1
vote
1answer
89 views

Apache: redirect URL of internal WSGI server

The following Apache conf file serves a WSGI application via port 9002: <VirtualHost *:9002> SSLEngine on SSLCertificateFile /etc/apache2/ssl/apache.crt SSLCertificateKeyFile ...
1
vote
2answers
90 views

URL for website with multiple currencies

It seems that most of the websites which handle currencies keep track of the current currency throughout the user browser session and not through the URL itself. This way, when sharing the URL with ...
1
vote
1answer
40 views

Changing www to point to non-www, instead of the opposite, using .htaccess

I'm switching servers and need to change the following RewriteCond and RewriteRule commands in the .htaccess file. Right now I'm pointing domain.com to www.domain.com using: RewriteCond %{HTTP_HOST} ...
2
votes
0answers
113 views

Rewrite rule not matching second level directory URL [closed]

I have this .htaccess in a po_systems folder of my website # Set up mod_rewrite RewriteEngine on RewriteRule ^build_system/([^/]+)/([^/]+)/?$ ...
3
votes
1answer
271 views

Dynamically rewrite URLs upon the user's selection - is it possible?

In my PHP based web application, there's a form that generates a URL according to the user's selection. The form has 7 different fields, each one of them affects the final URL, none of them is ...
1
vote
2answers
448 views

Which method is better to add “www.” before domain name

I have search through Google and found 2 methods to add www before domain name. First is by adding a CNAME and second is using rewrite mod in .htaccess file. I just want to know which method is ...
0
votes
1answer
88 views

How to secretly rewrite Google Analytics campaign codes to main page?

I want to create a simple "secret" mod_rewrite redirect (not shown in user's browser address box) to redirect: http://www.mydomain.com/code -> ...
0
votes
0answers
52 views

Trouble with encode URL rewriting ASP.NET

Some mounths ago I used links to image as: http://rielter77.ru/imgrs.axd?w=300&file=24587263-7fdf-415a-86fe-9de5f4c18fbb.jpg 3 weeks ago I create a URL rewrite rule: from ...
1
vote
0answers
83 views

Allow (and correct the URL) when there is a special character such as %26 using IIS and the rewrite module

I'm struggling with a legacy app that uses special characters like %26 in the URL. The characters don't affect the app but can't be changed, so I'm trying to get IIS to deal with them. I've tried ...
0
votes
0answers
55 views

When IIS rewrite rule fails it triggers or moves on to a 2nd rewrite rule

Windows 2008 Server: IIS 7.5 I want to construct a rewrite and redirect rule so that if it fails, (can't find the page because the condition is not met, or perhaps page does not exist) another rule is ...
1
vote
1answer
97 views

“Syntax not understood” error in Google Webmaster Tools robots.txt analysis when I use RewriteRule

In order to redirect my www.site.com to non-www, I employed this bit of code found somewhere on the web. RewriteCond %{HTTP_HOST} ^www.website.com [NC] RewriteRule ^(.*)$ http://website.com/$1 ...
3
votes
3answers
1k views

URL rewrite - should I write a fake file suffix (.html) or something more realistic to the platform? (like .asp or .cfm)

First, I'd like to preface this question by stating that I insist upon publishing a file name suffix, but only on the outer most entity of our site, the detail pages. I do realize the suffix is not ...
1
vote
1answer
92 views

Redirect rule to new site still requires old site to be active

I have two websites being served on IIS 7.5 Windows Server 2008, with one site (projects.com) recently moved so that it now sits under the 2nd site (mainsite.org). This sub-site has numerous resources ...
3
votes
1answer
379 views

Canonicalization for www/non-www URLs and IP/domain on a Windows server

I have checked my website using this SEO tool and the results report 2 issues: Test your site for potential URL canonicalization issues. Canonicalization describes how a site can use slightly ...
1
vote
1answer
524 views

URL Rewrite in IIS 7.5

I have a web site (hosted on IIS 7.5) that has bindings to four URLs. Something like: www.example.com example.com www.example.net example.net What I would like to accomplish using URL Rewrite is ...
2
votes
1answer
73 views

301 redirects, query strings and SEO

We have recently consolidated one site into another one. We set up all of our 301s and those all work famously. The bulk of the 301s (including the old site's homepage) land on an interior page of ...
1
vote
1answer
94 views

Rewrite URLs not working - wrong method or conflict?

I've been at this for about an hour now and I'm not having much luck. htaccess files are quite new to me, so I'm obviously doing something very wrong. Current htaccess content, which I need to keep: ...
0
votes
1answer
30 views

URL subfolder rewrite without server access

I am having trouble with the following. I have a site in development that has every link on the site pointing to the wrong folder. Example: example.com/en/home/, a site link goes to example.com/en/, ...
3
votes
1answer
158 views

Redirect www to non-www using Apache htaccess does not work

I have this in my .htaccess (modified from the default Drupal .htaccess): RewriteCond %{HTTP_HOST} ^www\.website.com\.com$ [NC] RewriteRule ^(.*)$ http://website.com/$1 [L,R=301] In theory this ...