0
голосов
4ответов
3010 просмотров

How can I match the domain part of a URL in PHP?

I'm so bad at regexp, but I'm trying to get some/path/image.jpg out of http://somepage.com/some/...etc and trying this method: function removeDomain($string) { return preg_replace("/http:\/\/.*\//", "", $string); } It isn't working -- so far as I can tell it's just returning a blank stri...

1
голосов
3ответов
1303 просмотров

Can we use ASP.Net Url Rewriting features in classical ASP

I am developing an application in classical ASP that now requires sef urls. I do not have any asp.net experience but I've heard that ASP.NET+IIS6 provide built-in url rewriting functionality. So before i have someone purchase a url rewriting component for me, I am wondering if it is possible to u...

18
голосов
3ответов
30703 просмотров

Apache rewrite rule with parameters?

I have the following URL: http://domain.com/index.php?m=feedback&cSubject=My Subject I want to have a rewrite rule so that the following: http://domain.com/feedback?Subject=My Subject maps to the previous url. Heres my rule at the moment: RewriteRule ^feedback?Subject=(.*)$ index.php?m...

0
голосов
2ответов
1360 просмотров

UrlRewriter.net problem with master page

i have implemented Intelligencia.UrlRewriter im my masterpage site. I am successfully able to redirect the page. but on the virtual path its not able to find the CSS/javascript file. Also its not able to find when i user url like http://localhost/mywebsite/test/ but it works when i use http:...

0
голосов
1ответов
209 просмотров

How do I redirect url to a specific page in IIS6 webserver

I have a site hosted on IIS6 server. All the pages with specific url (e.g http//www.example.com/products/my-product-name_11.asp ) are redirected to http://www.example.com/product.asp. but from where it is happening i dont know. So in order to change it what should i do?

39
голосов
4ответов
66109 просмотров

Rewriting URLs from https:// to http:// in IIS7

I'm trying to rewrite urls from the form: https://example.com/about to the form http://example.com/about using IIS7 URL rewriting: <!-- http:// to https:// rule --> <rule name="ForceHttpsBilling" stopProcessing="true"> <match url="(.*)billing/(.*)" ignoreCase="true" />...

1
голосов
2ответов
1281 просмотров

Removing index.php from URL but keep old links working

I'm trying to remove the index.php from the URL, which is working with the .htaccess examples found on the EZPublish site and ForceVirtualHost=true. The problem is that the old links that point to index.php are no longer working (which is problematic when linking from search engines). I've tried ...

1
голосов
1ответов
1347 просмотров

asp.net: RewritePath to Default Document not Working as Assumed

I am encountering an unexpected behavior: The following statement works fine: Context.RewritePath( "~/Default.aspx" ); // redirect to default doc, explicitly This gives me a 404 error: Context.RewritePath( "~/" ); // redirect to default doc, implicitly Loading document / from a browser w...

0
голосов
1ответов
645 просмотров

htaccess subdomain redirect *above* the rewritebase?

I have a photo gallery at mydomain.com/photos. I'd like to use RewriteRule to enforce photos.mydomain.com as the URL, but the photo gallery comes with its own .htaccess that declares a RewriteBase of /. I think that this is preventing me from doing the otherwise simple redirect I'm aiming for. Ho...

0
голосов
2ответов
480 просмотров

URL rewriting- How can I turn example.com/pageid.php?id=12 to example.com/full-title

I want to make my pages search engine friendly and it also looks better that example.com/pageid.php?id=12 I have pages different pages like showUser.php showLocation.php and I want all these to be rewritten. Wo'nt mod_rewrite slow down my app a little bit?

2
голосов
5ответов
1396 просмотров

ASP.net MVC performance with extensionless url on IIS 6

We are getting ready to do a an initial deployment of an ASP.net MVC app on IIS 6 running on Windows Server 2003. We've been reading about performance issues involving the use of extenionless urls in MVC applications specifically in the case of removing the '.aspx' extension from the controller p...

1
голосов
1ответов
621 просмотров

Very strange URL rewrite problem?

I am rewriting the url http://www.tworiverstaines.co.uk to http://www.tworiverstaines.co.uk/TwoRivers/ When the site first loads the rewrite works correctly displaying Default.aspx with all the hyperlinks working correctly including the path to the App_Themes folder etc. However when you click ...

0
голосов
4ответов
1291 просмотров

Parsing URLs using PHP

I have posted a similar question here. However, this was more about getting advice on what to do. Now that I know what to do, I am looking for a little help on how to do it! Basically I have a website that is pretty much 100% dynamic. All the website links are generated using PHP and all the pag...

1
голосов
1ответов
1507 просмотров

urlrewriter issue: Query string is duplicated shown?

I'm using urlRewritingNet. My web.config is here>> <add name="HOME" virtualUrl="^~/(.*)/Default.aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/Default.aspx?PageTitle=$1" ignoreCase="true"/> My query string is here: www.domain.com/home/default.aspx Thi...

4
голосов
3ответов
1950 просмотров

How can I display SEO friendly URLs using mod_rewrite?

I am not a PHP developer at heart and I have been asked to perform some SEO on an existing PHP website. The first thing I noticed was the ugly URLs so I want to get these to rewrite to something more informative. Here are all the possible patterns: /index.php?m=ModuleType&categoryID=id /ind...

0
голосов
2ответов
300 просмотров

How do I rewrite URLs using htaccess?

How can I rewrite the following URL: http://www.myurl.com/job/Accounting-Clerk-at-Department-of-Workforce-Services-in-Salt-Lake-City,-UT-1b6117567108f5a2 Into these components: query = Accounting Clerk; cmp = Department of Workforce Services; location = Salt Lake City, UT; key = 1b6117567108f...

0
голосов
1ответов
269 просмотров

Wildcard application map causing error on umbraco homepage

I'm trying to setup my umbraco site so that it does not use the .aspx extension. I made the necessary changes to the config files, but when I added the wilcard application mapping in IIS the homepage now comes back with an object reference error (at System.Web.UI.Control.ResolveClientUrl) if I t...

0
голосов
2ответов
2893 просмотров

How do I use IIS7 URL rewriting to hide virtual directories?

I have a server with IIS7 that I am using to host several different sites for testing. Due to an overabundance of bureaucracy, I am unable to use host headers (I can't get new entries on our internal DNS server and users can not change their local hosts file). I have set up the default site in ...

2
голосов
2ответов
2120 просмотров

Using an SSL certificate with .htaccess rewrite

I'm wondering, if I have an .htaccess rewrite setup on a virtual subdomain, ie. bm.example.com that has a rewrite to www.example.com/index.php?u=someId and I have an SSL certificate on www.example.com, will I run into problems if I try and access https://bm.example.com?

1
голосов
2ответов
637 просмотров

Rewrite index.php in Wordpress

I started a blog and when I changed my permalink structure to /%postname%/ I get a Page Not Found error. I want my url to look like this: http://bobbybeckner.com/sharepoint-list-and-linq-using-jquery-and-ihttphandler/ not this: http://bobbybeckner.com/index.php/sharepoint-list-and-linq-using-...

2
голосов
4ответов
783 просмотров

What's the simplest way to rewrite Urls in ASP.NET MVC / IIS7?

I'm developing an ASP.NET MVC application on IIS7 and I need to rewrite requests to all files from a directory in my application and it's subdirectories to another directory. The files are images, stylesheets, classic webforms files and vanilla html documents. What's the easiest way to achieve ...

1
голосов
1ответов
208 просмотров

MVC url Rewriting something like http://controller.website.com

Using MVC. Is there a way to make any url like .example.com to point to example.com/user/ as in http://marwan.example.com to point to example.com/user/marwan The controller is user and the action is index which takes marwan as its variable. One idea I had is to make a custom error page to hand...

2
голосов
2ответов
2851 просмотров

IIRF URL rewrite to force www prefix: example.com -> www.example.com

I'm trying to do something pretty simple in iirf. I want all requests that are missing the www. prefix to have it added. This is my IsapiRewrite4.ini: RewriteCond %{HTTP_HOST} ^example\.com$ [I] RewriteRule ^(.*)$ www.example.com/$1 [R=301,L] This is my SampleUrls.txt: example.com example...

0
голосов
2ответов
135 просмотров

URLRewriting challenge

I'm using URLRewritingNet 2.0. How do I rewrite URL's in ASP.NET? Here is the request: Input: www.sampleweb.com/param1/value1/param2/value2/default.aspx Output: www.sampleweb.com/default.aspx?param1=value1&param2=value2 It must work dynamically like this param1/value1/param2/value2/ ......

1
голосов
5ответов
22034 просмотров

ASP.NET : Hide Querystring in URL

I don't know if I'm just being overly hopeful, but is there a way to hide the query string returned in the URL? The scenario I am in is where I have page1.aspx redirecting a command to an outside server via a post, and it returns it to page2.aspx. The only problem I have with this, is that the ...

1
голосов
2ответов
240 просмотров

.htaccess mod_rewrite problem - shot myself in the foot?

I have a page called category.php5 that uses $_GET["category"] to fetch the right content from the database. I want to pretty it up so is looks like: sinaesthesia.co.uk/category/psoriasis which would equal: sinaesthesia.co.uk/category.php5?category=psoriasis I have successfully done this sort...

0
голосов
5ответов
442 просмотров

How To rewrite a url with PHP?

Let' say for example one of my members is to http://www.example.com/members/893674.php. How do I let them customize there url so it can be for example, http://www.example.com/myname I guess what I want is for my members to have there own customized url. Is there a better way to do this by reorga...

2
голосов
1ответов
1134 просмотров

URL Rewrite affecting virtual application root for all asp.net controls

I am using the following rule to map a domain through to a subfolder in my shared hosting environment: <rule name="mydomain.co.uk"> <match url="(.*)" /> <conditions logicalGrouping="MatchAny"> <add input="{HTTP_HOST}" pattern="^www.mydomain.co.uk$" /> <add input="{HTTP...

0
голосов
1ответов
364 просмотров

URLRewriter.net regex for querystrings

I have this url: http://www.site.com/products-book_1.aspx?promo=free Here is what I have in my web.config for the UrlRewriter rules: <rewrite url="~/products-(.+)_(\d+).aspx" to="~/product.aspx?pid=$2" /> What can I add to this expression to also retrieve the promo value? The en...

5
голосов
3ответов
2800 просмотров

Forwarding http://mydomain.com/ctrlr/act/val to http://WWW.mydomain.com/ctrlr/act/val

I have an application written on ASP.NET MVC (V 1.0). The application runs on IIS7 and the DNS is provided by GoDaddy. I would like to forward any request that comes from http://mydomain.com/ctrlr/act/value to a URL of this form: http://WWW.mydomain.com/ctrlr/act/value Basically, I want to add ...