url-rewriting

rewrite url issue

Hey, I'd like to know why the following htaccess file produces a 500 error: <IfModule !mod_rewrite.c> ErrorDocument 500 "Your_Server_Is_Not_Compatible: Apache does not have mod_rewrite loaded. Please check your Apache setup." RedirectMatch 302 .* index.php </IfModule> <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^(...

Response.Redirect on Page with Url Rewritten by IIS Url Rewrite Module

I am using the IIS Url Rewrite module to rewrite urls for my ASP.Net web application. The Urls are being rewritten from: http://domain/version/page.aspx to http://domain/company/page.aspx And it works just fine when browsing directly using absolute paths. The problem comes in when navigating within the app using relative paths. any k...

Complicated URL Rewrite. Rewriting index.php, yet wanting to rewrite other.php to load without extension

I have an installation of CodeIgniter. Basically, my directory structure looks like this: | webroot |- ci_apps |-- application1 |-- application2 | ci_system | index.php | testing.php Right now, I can only load one application, which is defined in index.php. What I would like to do is be able to rename index.php to application1.php and...

How to Display Nice URL for Wordpress Category Page?

I have a site whose home page shows a single Wordpress category page. I'm using a custom theme and the index.php file there does a 301 redirect to "mysitename.com/?cat=3". This page is generated with an event calendar plugin and a lot of custom code. It works, but the displayed URL is "mysitename.com/?cat=3" which I'd prefer my visito...

ASP.NET 4 migrate to routing / mapping

Hi, Previously I was using Rewriter.net to rewrite my urls. I used a format like: <rewrite url="~/(.*)_p(\d+).aspx\??(.*)" to="~/product.aspx?pid=$2&amp;$3"/> So a page url would look like ~/productname_p21.aspx with an optional querystring. I'm upgrading the application to ASP.NET 4 and I would like to use the URL routing in System...

IIS7 URL Redirect Not working for ASPX pages with colons in the name

This is related to a previous (unanswered) issue I've had with trying to catch request errors in the Global.asax, but it now appears to be more widespread. The URL redirect feature in IIS7 will not handle URLs which both end in .aspx and contain a colon anywhere in the url. Rather than follow its own redirect rules, IIS7 treats .aspx pa...

problem getting redirect to work properly php

Hi. I have a little problem with redirecting. Registered users follows this link site.com/reg.php?passkey=1234 but the first the user get redirected to the correct language based on a cookie. I need to keep the passkey variable when the user is redirected. like this ?lang=en_US&passkey=1234 My code so far look something like this: if...

Is It Possible to Alter the Displayed URL from the Actual URL?

I posted a question the other day about how to change the displayed URL on a Wordpress-generated page, specifically from something like "mysite.com/?cat=3" to just "mysite.com". I got a few replies that steered me towards doing some type of redirect with .htacess. After some research and experimentation, I realized that it's not so muc...

Rewriting a domain name so it is handled by a different server binding... Is it possible?

I would like to rewrite a subdomain so it is passed as a querystring to a site. Take the following scenario. IIS Config: Site A (bindings: *, site-a.com) Site B (bindings: site-b.com) Rewrite rules: "sub1.site-a.com" -- rewrite to -> "site-a.com" "sub2.site-a.com" -- rewrite to -> "site-a.com" "sub1.site-b.com" -- rewrite to -> "site-...

Rewriting URL for the default action in controllers

I'm having trouble rewriting URL's in Grails: I've got 2 controllers BlogController and ProjectsController each with a default def index = { } and matching view. Now when I create the following links: <g:link controller="blog">Blog</g:link> <g:link controller="projects">Projects</g:link> They get translated to http://localhost:8080/...

Url rewrites for unique site names in Wordpress Multi-site without subdomains or subdirectories?

Is there a way in multi-site WP3.0 to provide unique site names without using subdomains or subdirectories? For example, my multi-site name is sites-d.ourdomain, but I want the urls for each site instance to look like this: [site1].ourdomain (instead of sites-d.ourdomain/[site1] or [site1].sites-d.ourdomain) Our clients expect to have ...

mod_rewrite URL rewriting with or without Slash

What is the correct way to write out the .htacess so that both www.domain.com/about_us and www.domain.com/about_us/ goes to www.domain.com/about_us.php Currently, what I have is the below and just wonder if there's a way to put it in one line Options +FollowSymLinks RewriteEngine on RewriteRule ^(about)$ /about_us.php RewriteRule ^(abo...

How do I remap a URL?

I need to move an old legacy web service to a new location. It will be under a virtual directory now rather than it's own website in IIS. Unfortunately I can't change the config settings for a client that is using the service, so is there a way to map the URL from the old address to a different site in a virtual directory? Eg. http://o...

could somebody explain to me how to use mod_rewrite to create pretty permalinks like wordpress does?

i am writing a site from scratch using php/mysql and am using GET requests to pass data between the pages. at the moment my links look like: http://pkh:55/?service=213971&amp;type=FSD but i would like to use mod_rewrite to make them more relevant, ie: http://pkh:55/FSD/services/football-youth-club/ i've had a look through the word...

PHP, LAMP server, changing display paths of certain URLs?

I apologize if this is a basic question, however I have been searching on this and can't find anything of use, probably since I don't really know the proper terms.. I am wondering if there is a way to interpret the url that is called on the server, such as: http://mydomainname.com/site1/module1 and then using PHP (ideally), or some oth...

how do i get mod_rewrite to execute the RewriteRules if and only if there is no paramater q= in the url?

the below code works to deal with my url structures but i need the rules not to work if there is parameter q= in the url. i tried to set up a rewritecond (in the commented out line below) without success, please help! thanks :) Options +FollowSymlinks RewriteEngine on # RewriteCond %{QUERY_STRING} q!=(.*) RewriteRule ^FSD/([^/]+)/([^...

is it possible to do URL re-write in asp.net?

I have developers working on a site for me, they have told me there is no possible way to re-write the URL so there is no second level category e.g. Remove "/category" from this URL http://www.somesite.com/category/page.aspx I understand that page.aspx can simply go in the root folder on the server however I don't want to do this as addi...

Getting id from pretty url as an intval

Alright, I have my urls set up to rewrite "news_item.php?id=1" to "blog/1/Title-of-post". This works great apart from when a title has numbers at the start for example "blog/23/12-days-to-go" it can't find the right id. Here's how I have it setup, maybe someone can make sense of it. Rewrite rules RewriteRule ^blog/([0-9]+)/([a-z-]+)/...

How in magento add manufacturer in the URL of the product?

How can I change magento so that: {site}/category-name/sub-category/product-name becomes {site}/category-name/sub-category/manufacturer/product-name Where is the standard Magento manufacturer attribute? Thanks :) ...

Does anyone use URL Rewriting in production?

I've used tuckey's UrlRewriteFilter in small projects, but I'm hesitant to use such a thing in a production environment that could touch tens of thousands of paying customers (it feels kludge-y). Is it fine to use a rule-based rewriting engine in production, and what are some alternatives I could use for clean URLs? ...