url-rewriting

Is ASP.Net 2.0/Ajax toolkit the right technology for implementing a SEO friendly website

Hi, As I understand it, just URL re-writing is not the only thing one needs to do for making a website SEO friendly. You also needs to maximize the use of div (instead of tables), reduce javascripts, flashes and have a clean HTML. I need to know how can this be achieved when one used a ASP.Net control. ASP.Net send loads of stuff to th...

.htaccess / redirecting to https://www.example.com and virtual folder access

Hi, I have a domain example.com. I want users to be redirected to https://www.example.com whenever one of the following is typed: http://example.com http://www.example.com https://example.com I also need to redirect people accessing /asdf (or /asdf/) to /index.php?folder=asdf. I found some examples of code doing the first part, but...

URL Rewrite and JavaScript QueryString fetching.

I'm using code in the Application_BeingRequest() handler of my Global.asax to do some very primitive URL Rewriting. That works fine, however I'm having issues fetching the rewritten url in JavaScript. So using URL Rewriting 'www.mydomain.com/dothis' becomes 'www.mydomain.com/?action=dothis' on the server side. Using ASP.Net and Request....

Apache Url Rewriting won't work.

In the httpd.conf file I have AllowOverride FileInfo. In the .htaccess file in top level of my webserver with all the other files, I have this: RewriteEngine On RewriteRule ^downloads/?$ index.php?page=downloads [L,NC] But it doesn't work. mywebsite/downloads and mywebsite/downloads/ always give a 404 not found. Any idea why? Thanks. ...

Classic ASP URL Rewriting

Hi there, I was wondering if it is possible to do URL Rewriting with Classic ASP when you do not have access to IIS to make any rewrite changes? We have an online shop where products are typically linked as /product.asp?ContentID=X but would like to have something more SEO friendly such as /product/unique-product-name Unfortunately we ...

Problem with Japanese/International Characters with IIS7 URL Rewrite

I have a friend with a Japanese blog, using wordpress, he has the pretty url. Basically domain.com/postname. Well an example of a url might be. "domain.com/テスト". His blog is hosted on an Apache web server. I am running IIS7 and am trying to get my Japanese blog going like it should, and have "domain.com/テスト" show just that one post when...

Nginx rewrite non-www-prefixed domain to www-prefixed domain

I see the Nginx HttpRewriteModule documentation has an example to rewrite a www-prefixed domain to a non-www-prefixed domain: if ($host ~* www\.(.*)) { set $host_without_www $1; rewrite ^(.*)$ http://$host_without_www$1 permanent; # $1 contains '/foo', not 'www.mydomain.com/foo' } How can I do the reverse-- rewrite a non-www-prefi...

htaccess rewrite rule doesn't work with dashes?

Hello, my htaccess rule isn't working with rewrite with dashes in: RewriteRule ^([A-Za-z]+)$ index.php?do=$1 [QSA] so, www.domain.com/rules works, however, www.domain.com/about-us doesn't I've verified that www.domain.com/index.php?do=about-us works so it's definately a rewrite issue. Thanks. ...

Use relative urls in Joomla menus

Hi SO, I have joomla site which is located in mydomain.com/somefolder/otherfolder/TheSite. I have created a rewrite rule to invisibly redirect all requests beginning with mydomain.com/TheSite to this url. It works fine. My problem is that the urls that my menuitems point to are the old mydomain/somefolder/otherfolder/TheSite/stuff. If...

Rewrite parked domain to subfolder on primary domain

I am having a ridiculously difficult time getting an Apache Rewrite rule to function as intended. Wondering if anybody could help me spot the error. I am trying to rewrite a parked domain to a subfolder on the primary domain without changing the browser address bar url. RewriteCond %{HTTP_HOST} ^domain-name\.com$ [NC] RewriteRule ^/...

How do you make a CMS and existing asp.net applications live together peacefully in IIS?

Note: I originally posted this on ServerFault, but I haven't gotten any responses at all. Since it looks like I'm on track to get the Tumbleweed badge over there, I figured I would try here also. Our existing public website consists of a mish-mash of asp.net pages with mostly static content and some real web applications that are set ...

Creating a Grails catch-all URL-mapping

How do I create a catch-all URL-mapping in Grails? The following Grails UrlMapping .. class UrlMappings { static mappings = { "/$something"{ controller = "something" action = "something" } } } .. appears to match ^/[^/]* but how do I create an UrlMapping matching all URLs (^/.*)? ...

Wordpress removing WWW

Hello. I've recently set up a wordpress blog and it's removing the www from all URLs. I've disabled all plug-ins, and it still does that. My .htaccess is: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfMo...

How can I make the URL search engine friendly?

I want to cahange mysite.com/profile.php into mysite.com/profile I wrote the htacess file as RewriteEngine On RewriteRule ^profile/?$ profile.php [NC,L] and placed in root directory. It doesn't work. I use the apache server. What is wrong with my program? ...

Directing non extension files to .php

I have a file with .php extention www.example.com/thefile.php?name=123 that I want to direct the user to if the user visits any of the following aliases: www.example.com/alias?name=123 www.example.com/unreal?name=123 www.example.com/fake?name=123 Is there a way I can get this done without using a framework that already uses this stru...

Java code/library for generating slugs (for use in pretty URLs)

Web frameworks such as Rails and Django has built-in support for "slugs" which are used to generate readable and SEO-friendly URLs: Slugs in Rails Slugs in Django A slug string typically contains only of the characters a-z, 0-9 and - and can hence be written without URL-escaping (think "foo%20bar"). I'm looking for a Java slug funct...

Mod_rewrite-multiple pages

Hi guys I have two URLs that I would like to rewrite: /artist.php?name=x => /x /albums.php?title=y => /y This is what I put in the .htaccess file: RewriteEngine On RewriteRule ^([a-zA-Z0-9_-]+)$ artist.php?name=$1 RewriteRule ^([a-zA-Z0-9_-]+)/$ artist.php?name=$1 RewriteRule ^([a-zA-Z0-9_-]+)$ albums.php?name=$1 RewriteRule ^([a-...

URL Rewriting Help

I'm trying to learn Regex & URL Rewriting in PHP. How can I create an .htaccess file which will rewrite (not redirect) any url to index.php?q={url}? For example: http://www.example.com/baloon to http://www.example.com/index.php?q=baloon I tried: RewriteEngine On RewriteRule ^$ index.php?q=$1 [R] ...but it is not working...

Rewriting example.com/folder/path to example2.example.com/path

Actually the thing is that i'm having a sub domain (example.domain.com) which is redirected from other domain of a folder (www.domain/folder) . but need the rewrite rule for my sub domain which shows the url links for the main domain ie., www.domain/folder/path i need to get as example.domain.com/path. Instead of getting the main domain...

ISAPI_Rewrite Rule for version 2

How can I write the following rule in older version of ISAPI_rewrite ? RewriteCond %{HTTP_HOST} ^fit-reisen.de$ [NC] RewriteRule ^(.*)$ http://www.fitreisen.de/$1 [R=301,L] I tried to write like RewriteCond Host: (?!^www.fit-reisen.de)(.+) RewriteRule /(.*) http\://www.fitreisen.de/$2 [I,RP] but i did not work. ...