I have two .htaccess files that I need to combine into one.
The first one does a simple file extension remover.
The second one rewrites all requests to go to a third party app, keeping our URL.
What I need is to have the rules be smart enough to not look at the second server if the file exists on the first.
Rule1 :
RewriteEngine on
...
I'm developing my first decent-sized PHP site, and I'm a bit confused about what the "right way" (assuming there ever is such a thing) to handle clean/friendly/pretty URLs in the application.
The way I see it, there are two main options (I'll use a simplified social news site as an example):
1. Use mod_rewrite to handle all potential U...
PAls,
I have lot of URLs with + in it. ie., (http://domain.com/abcd+ac.aspx, etc)
Im planning to move that hosting to Godaddy, but they firmly said they wont support + in the URL.
Reply from them :
Unfortunately, our servers will not recognize special characters such as the "+" character and is not something that we are will...
Hi, I'm trying to understand how I should work with characters in URLs, this because I'm building a site where the user can store content and go to the content's page by digiting it's name in the URL.
so, something like Wikipedia or Last.FM website.
I see in the site, user can write something likehttp://it.wikipedia.org/wiki/Trentemøll...
hi, I'd like to create a filter which allows almost all chars but without / < > ? =
I've read in some site, I shoud use the ^ char inside ranges, but if I try it doesn't work properly:
mod_rewrite:
RewriteRule ^(user/)([^\<\>\?=]+)([/]?)$ user.php?username=$2
php for validation:
return eregi ("[^\<\>\?=/]", $value);
how I shou...
I have written a simple redirect rule for IIS7, I would like to apply this same rule across the entire server so I added it to the applicationHost.config via the IIS interface. I have confirmed it has created the rule correctly in the file, however it simply does not work, I get no error so it is hard to know what I am doing wrong?
...
Note: I have done hours of digging for the answer, and couldn't find one.
I have an ASP.NET MVC (2.0) application, hosted on IIS7 (integrated mode).
When GET request is made to /Toons/List - I get a redirect (302) to /Toons/List/ which is expected.
THE PROBLEM
But when I send a POST request, say to /Toons/Add (notice no trailing...
In my application, I have a number of controllers with the same prefix. For the sake of example, let's say they are:
my_posts
my_users
my_letters
The URLs generated for these are obviously:
/my_posts/view/1
/my_users/add
/my_letters/whatever
I'd like to set up some custom routing so that I can use the URLs like this:
/my/posts/vie...
Hi there,
tried to find the problem for this but nothings really working.
Basically, I'm trying to use the following regular expression:
RewriteRule ^course/filter:([a-zA-Z0-9_-\,\=]+)$ php/manage_courses.php?display=list&filter=$1 [L]
however I get a 500 error and this in the error log (note the escaped chars):
[Wed Jan 27 16:29:3...
I have a domain, mattpotts.com and have set up a sub-domain dev.mattpotts.com for me to develop on and will then copy the files to the normal domain when they're ready to go.
My directory structure is as follows and dev.mattpotts.com points to dev/
+-public_html/
+-project1/
+-project2/
+-project3/
+-dev/
+-project1
+-p...
Is it possible to rewrite an url and also block the file extension?.
eg: if I have
`http://www.example.com/search.php?...`
can I rewrite it to
`http://www.example.com/search?` ?
but, blocking the access to the .php file, normally I can access with both ways, with and without the file extension, but I want it to show an error page...
Is it possible to do something like this with regular expressions: encode and decode a number?
For example I want to encode the id 15123 (which actually represents a port number in my case) into something which is useless to a user, for example a seemingly random string such as c95Dd7!7. And then decode it afterwards.
I want to do this...
What happens first in the pipeline: a URL Rewrite (as defined in the URL Rewrite module of IIS), or a HttpHandler (added with the add managed handler functionality of IIS7)?
...
Often I want to change just one part of a URI and get a new URI object back.
In my current dilemma, I want to append .nyud.net, to use the CoralCDN.
I have a fully qualified URI fullUri. How can I, in effect, do this:
fullUri.Host = fullUri.Host + ".nyud.net";
This needs to work for almost any URL, and the PORT of the request needs...
Hi, I'm trying to work with special chars in URLs but I have some trouble on undertand what I shuld do to get it works correctly.
I've saw URLs like:
http://www.last.fm/music/Simon+&+Garfunkel
http://www.last.fm/music/小林武史
works perfectly on Last.FM, but how can I do that?
I've asked at this question some way to do it, but has s...
Could anyone help me with this regex issue?
^(Songs|Albums)$
becomes
{R:1}.aspx
This gives you songs.aspx, albums.aspx
wondering if I can do this in Regex:
^(Songs|Albums|Songs/List)$
and how do I get SongsList.aspx from Songs/List?
Thanks!
Edit
This worked:
^(Songs|Albums)/(List)?$
{R:1}{R:2}.aspx
...
Is there a way of creating dynamic URLs so when someone access my site with ####.example.com the #### would be a key of where to go.
I know Elance does it with usernames, instead of www.elance.com its username.elance.com
...
Hello, I will apprecaite your help in this topic.
I need to build a site with friendly urls using url rewriting in order to improve SEO positioning.
I've been searching torought web and finally pointing to this two main options :
asp .NET with isapi extension
asp .NET mvc
however, I got no experience on both items so I need you...
How can I forward a url such as:
http://www.mysite.com/Join
to the appropriate page:
http://www.mysite.com/JoinOptions/MemberRegistration.aspx
Is there some way to do this?
I'm using a DNN CMS but if you're unfamiliar with DNN and still have a solution for redirecting that would be helpful.
Thanks,
Matt
...
Hello
I have website designed in WSS 3.0 (Windows SharePoint Services 3.0). Can i re-write URLs to Google / SEO friendly URLs? If yes then please do let me know how to do it?
Thanks,
Rau.
...