I have a web service with url like:
'https://tgis.ml/geoserver/gwc/service/tms/1.0.0/ctw:bwc_bandonen_group#EPSG:900913#png/13/6520/3864.png?flipY=true'
In IIS, i want to make frienly url like:
'https://tgis.ml/geo/tile/13/6520/3864.png'
I solved the above problem with:
Math URL:
tile/([_0-9a-z-]+)/([_0-9a-z-]+)/([_0-9a-z-]+).png
Rewrite URL:
http://localhost:3002/geoserver/gwc/service/tms/1.0.0/ctw:bwc_bandonen_group#EPSG:900913#png/{R:1}/{R:2}/{R:3}.png?flipY=true
Related
I have a virtual machine in Azure and on that machine I have a IIS installed. On that IIS I have installed the URL Rewrite module and redirect all HTTP calls to HTTPS.
The problem I am noticing is that my rule that I am creating is removed from time to time. Have anybody any clue to why this is happening and how I can do the redirection from HTTP to HTTPS instead in a way not using the URL rewrite module.
Thanks
/Magnus
Aaa I found it!
It seems that the URL rewrite is removed every time I deploy a new version, and the reason is that the URL rewrite information is saved in the web.config file on the server when I add it in the IIS Administration.
And it's not part of my web.config file that I deploy. So all I have to do is to add the XML added by the URL Rewrite module from the web.config file on the server to my web.config file in my project and the redirect will stay.
I have a site which you can access with or without https rule. So, I need to make a redirect to another page. Example:
My website is: www.google.com so I can access by the moment as https://www.google.com and http://www.google.com but I need when you get into my website trough http or https way you must have to redirect to www.yahoo.com.
Besides I need the url redirection too to any subdomain or url which exists in http://www.google.com or https://www.google.com
How can I do this? I have no found alredy information about it in S.O. Thanks.
Very simple. You can use the following Redirect in your htaccess to redirect all requests from your site to the other domain
RedirectMatch 301 / http://yahoo.com/
I need to configure an URL rewrite that way:
Server Application Provider: Tomcat 8 with a Java Web Based Application.
WebServer: IIS 10.0
Original URL application:
http://localhost:8080/Spigen
Desired URL:
http://localhost/Spigen/bi/sams
I tried that way:
1- In IIS 10 I set up a Server Farm with
Server Address= localhost
httpPort= 8080
2- Configured a Rule to remove 8080 port from URL:
Rule 1
3- Configured a Rule of user-friendly URL:
user friendly config
I didn't have desired effect. When I access:
http://localhost/Spigen/bi/sams
I receive from browser 404 messagem:
404 message
I don't really have idea how could I get that.
The idea is to have several URL acessing the same application and the application make decisions based on it.
URL Examples:
/Spigen/bi/sams
/Spigen/bi/app
/Spigen/bi/nok
What configuration is missing?
I have fully static website, now I want to change this website to dynamic. But problem is that static website having good traffic and I do not want to lose that traffic. For the dynamic website I already rewrite the URL using htaccess for SEO reasons. I want to redirect the static url to the rewritten url (which was written by my .htaccess).
(A) Static URL :
www.website.com/examples/java/datatype/boolean/printbooleanvalue.html
(B) Original Dynamic URL:
www.website.com/examples.php?language=?java&category=data-type&subcategory=boolean&exampleurl=print-boolean-value
(C) Rewritted Dynamic URL :
www.website.com/examples/java/data-types/boolean/print-boolean-value
So I want to redirect URL(A) to URL(C). Is there any way to do this ?
You can hardcode the mod rewrite to load the php file when the html file is called.
The SEO friendly url that you have created in your .htaccess is redundant. Instead of the SEO friendly URL, use the same url as your original site.
For example in your .htaccess file write the rule like
RewriteEngine On
RewriteBase /
RewriteRule examples/java/datatype/boolean/printbooleanvalue.html$ /examples.php?language=?java&category=data-type&subcategory=boolean&exampleurl=print-boolean-value [L]
This will load the php file whenever the original html file is requested and it will use the same url as the older one.
Hope that helps.
Your .htaccess code:
Redirect /examples/java/datatype/boolean/printbooleanvalue.html http://www.website.com/examples/java/data-types/boolean/print-boolean-value
In any case you run into the need to redirect:
Redirect /olddirectory/oldfile.html http://yoursite.com/newdirectory/newfile.html
I finally found a way to remove get parameters from my urls
i had url like
/s.com/file.php?name=somthing
with this code i changed them to s.com/file/somthing
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^file/(.*?)$ http://s.com/file.php?name=$1
so far everything is ok
in my local host when i click on a url like s.com/file/somthing it goes exactly to the url
but in my server it redirects to old url and shows old url
i dont want to display my old url
can someone help?
http redirects are always external => visible in the browser. Try that:
RewriteRule ^file/(.*?)$ /file.php?name=$1