Intelligencia URLRewriter - All *.html to *.aspx - urlrewriter.net

How do I tell URLRewriter to convert all *.html request into *.aspx requests?
The following works just fine for one page.
<rewrite url=”~/mypage.html” to=”mypage.aspx″ / >
How do I do it in one place for all pages?
Thanks,

I'm not sure that this approach will be easy to maintain in the future. While this is easy to map as a wildcard, can you explain why this rule is needed?
For example, if you ever wanted to legitimately add a .HTML file to your solution, it would not be possible without an explicit <ignore /> statement being added to your XML file.

Related

Editing multiple files

I have the following problem:
I want to add the same text to multiple files. Specifically, I want to add an extension to a .dart file I'm not sure if there is already a pre-defined way for this in JetBrains' products (maybe not, but Android Studio for example).
class <classname> <add text here> //like in my case extends Class
The process would be
I select a bunch of files
I define my text I want to add
To all the files where it finds class it skips the next word and inserts the input.
If you wanted to achieve this without manually copy-pasting, how would you do it?
Thanks #LazyOne
With your suggestion, using the following regex solved the problem
(class)(\s.*)(\{)
replace with
$1$2extends <class>$3

URL rewriting all pages into one page?

I'm trying to get all URLs except for a few to rewrite to _main.php?url=/url/path/here (the exceptions being a System, Frameworks, _Assets, or Administrator folder). I have a RegEx that does this matching for me: (^|\n)(?!/?(?:_Assets|Administrator|Frameworks|System)).+ but I am not really understanding how to do this properly in IIS8. What it currently does is give me the correct data when I load the page, but it doesn't rewrite the URL, as seen in this image:
My rule looks like this (with no conditions or variables):
I was also trying to follow this guide, but it seemed like the exact opposite of what I wanted to achieve, and I don't know how to do the reverse.
I managed to solve this by changing the regexp to be (^|\n)(?!_main.php\\?)(?!/?(?:_Assets|Administrator|Frameworks|System)).+ (ignoring _main.php) and then changing the rule to be a redirect instead of a rewrite, which achieved the desired effect.

Magento translations dont work

I have a pretty weird problem. I see that some parts of my Magento translations are not working. I have the .csv translation files under right folder, and I have translated all fields for my language.
I see that 90% of the store is translated, but some parts just don't work. In example most of the checkout proces is translated, but sentance "Coupon is invalid" does not take affect.
Has anyone had this problem before? Can someone help?
Thanks
A couple things with this... First off, inline translation is known to have issues with translating 100% of things. Make sure as well that there does not already exist an inline translation for what you are trying to translate with your CSV. Make sure to refresh the translation cache in Configuration > Cache Management in the admin backend (and subsequently, if you're using block caching or full page caching, refresh that as well.)
Translation uses following :
1. Module name and language to decide which .csv file and folder to be used.
translation might come from a cache block or a FPC as commented in other post.
Transalation string is matched with string in csv and any difference in string might result in values not being displayed.
Suggested solution :
Make sure which block or .phtml is that string being generated and check its module xml file for something like this
as this tells Magento which module transalation file to be used.
also check for translate node within a module xml file.Something similar to this
<translate>
<modules>
<Phoenix_Moneybookers>
<files>
<default>Phoenix_Moneybookers.csv</default>
</files>
</Phoenix_Moneybookers>
</modules>
</translate>

Canonical, SiteMap and Index Files?

I've set all my website URLs to be displayed without any index.* references, through .HTAccess, so making my canonical definitions simpler. My question is, does the sitemap.xml definitions also need to lose the index.* references?
Ultimate aim is not to confuse Google...
You probably need to give some examples for us to make 100% sure we understand you correctly.
But yes, naturally your XML sitemap should reflect your real URLs :)
So if instead of somedir/index.html you now use somedir/ your XML sitemap should reflect that :)

Rewrite URL to HTML file causing rewrite to .html/

I'm currently working on an overhaul of my blog site, and have found a way to convert all my current pages into static html pages. They are currently using friendly url's which remap to a central index.php page with GET parameters attached on.
The change I am trying to make is have those same friendly URL's map to their html counterparts. I am currently using this rule:
RewriteRule ^archives?/([^/]+)/([^/.]+)/?$ archives/$1/$2.html
The error log is reporting that it cant find blah.html/ which means it's looking for the .html directory, instead of the .html file. So a better example:
/archives/2009/original-name
should be getting mapped to
/archives/2009/original-name.html
but is really getting mapped to
/archives/2009/original-name.html/
What am I missing here?
don't you need to use it the other way around? I didn't test the code but it should be something like this:
RewriteRule ^archives/(.*)/(.*).html archives/$1/$2
I can't see anything obviously wrong with your regex.
At a guess I'd say you might have a rule somewhere following this, which is redirecting anything without a trailing slash to its equivalent with the slash (a common thing to do to avoid duplicate content issues).
You didn't escape your period in the 2nd statement. Try this.
RewriteRule ^archives?/([^/]+)/([^/\.]+)/?$ archives/$1/$2.html

Resources