I need your help on IIS 7.5 rewriting module.
These are what I have:
http://www.mydomain.com/products/94128/country/***city_name(on)/product_100%_name
http://www.mydomain.com/products/92105/country/.city(??)_name/product_n.a.m.e-
http://www.mydomain.com/products/21365/country/city,_name./?product_,/name_3*
Can I remove all unwanted characters and make clean url like this one:
http://www.mydomain.com/products/21365/country/city_name/product_name
Related
I have a codeigniter website, using the latest version of the frame work. I was hosting my website on Azure, and it was working fine - never any issues.
I've just moved all the files to a different server, a linux one - standard normal web hosting type server with cpanel.
My site loads up, however a lot of pages I use that require models, are giving off errors, as if the files do not exist
Unable to locate the model you have specified: UsersModel
Just note : I have read so many articles today, that you need to have uppercase / lowercase and all that stuff, but that's how i already have it setup, it just does not work since changing servers. and it worked perfectly fine yesterday on the Azure server.
Also, when going to the actual file in my address bar, it takes me to the 404 error. not sure if this has anything to do with it?
Did you change your base url in config file ?
All model , controllers, helper ,library name must me capital letter.
If you change server remove index.php from config file where you will get config['index']= ""; and save this.
Still you get error then save base url like domain/project_name/index.php
I'm trying to install Phabricator on a cPanel/WHM server. According to this page:
https://secure.phabricator.com/book/phabricator/article/configuration_guide/#next-steps
I need to add some URL rewriting configuration to httpd.conf, but that's not really possible with cPanel, and the error is:
Request parameter '__path__' is not set. Your rewrite rules are not configured correctly.
I tried copying the rewrite rules to Phabricator's web root, and this should work, but it doesn't, and gives a 500 error, without any error log entries.
Tried changing this line:
RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA]
by removing the first slash (in case it didn't recognize this as the root directory), but it didn't help either.
What am I doing wrong, and is there a guide on installing Phabricator with cPanel/WHM (I wasn't able to find one)?
Note: I have root and WHM access to the server, but would like to avoid making changes that would require these permissions, if possible.
While this is really not the biggest problem when installing Phabricator on cPanel/WHM, the solution to it is a vHost-specific include, supported by cPanel/WHM. Here is a simple guide:
http://tecadmin.net/add-custom-settings-in-whm-cpanel-apache-virtualhost/
Some more information (although potentially more confusing) can be found here:
https://documentation.cpanel.net/display/EA/Modify+Virtualhost+Containers+With+Include+Files
When I design my web-application, I like to use "/" to designate the access to the root directory. Now, this works perfectly on my production site run on IIS 7.5.
However, when I try to run the site on VS 2010's virtual server, I keep getting 404 errors for any path that starts with "/".
Now, when I get a 404 error, the address in the addressbar is the correct address. For example, I have a link to /index.aspx' - and on the iis7.5 webserver, the path becomeshttp://my.site.com/index.aspxand it navigates perfectly. However on the VS virtual server, the path becomeshttp://localhost:61679/index.aspx` and I get a 404 error.
However, if I don't use the "/" in the path - that is, I either use a full path or leave it off, then the virtual server navigates to http://localhost:61679/index.aspx like is supposed to.
So the address is the same whether the "/" is the first character or not.
None of these links are using runat="server", so I don't need to worry about using ~.
Is there a setting somewhere to enable this?
[update]
I have a few more clues:
- When I navigate to http://localhost:61679/index.aspx it gets a 404.
- If I navigate to http://localhost:61679/mysite/index.aspx it loads fine.
- Links that start with "/" lead to http://localhost:61679/ NOT http://localhost:61679/mysite.
- This means that the "/" tells the VS server to navigate to the root of the server, not to the root of the site. However, it doesn't work this way in IIS.
If I tell VS to use IIS Express, everything works just fine.
That means there must be a setting somewhere to make "/" refer to the root of the site for Visual Studio's built-in server (I have referred to it as "virtual server").
I'm using an repackaged version apache which is called IHS (IBM HTTP Server). Basical the same as apache web serve with other features. What I'm trying to accomplish is to apply the rewrite rule to hide the complicated url with query strings with a shorten url.
Originally when I first test this out with 'R' Flag it work fine. It was able to match the pattern and response with the proper long url by redirecdt to the final url.
eg: https://example.com/us/ABC/123 -> https://example.com/webapp/headerText=ABC&categoryId=123
But after I have remote the 'R' flag, my rewrite failed with message of " File does not exist: /opt/IBM/HTTPServer/htdocs/dmcst/webapp". I'm trying to show the shorten url without given user the full url. The /webapp/.. is not an local path but rather it is a some other remote path. Why would this fail for 'rewrite' but not 'redirect'?
RewriteEngine on
Alias /wcsstore "/opt/IBM/WebSphere/AppServer/profiles/dmcwcsst/installedApps/WC_dmcwcsst_cell/WC_dmcwcsst.ear/Stores.war"
Alias /wcs "/opt/IBM/WebSphere/AppServer/profiles/dmcwcsst/installedApps/WC_dmcwcsst_cell/WC_dmcwcsst.ear/CommerceAccelerator.war"
Alias /static "/opt/IBM/content"
RewriteRule ^/us/([a-z].)/([0-9].)/?$ /webapp/wcs/stores/servlet/AcquisitionBrowseView?langId=-1&storeId=10001&catalogId=10051&headerText=$1&categoryId=$2 [NC,R,L]
From the WebSphere documentation:
http://publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=%2Fcom.ibm.websphere.nd.multiplatform.doc%2Finfo%2Fae%2Fae%2Fujpx_rewrite.html
Rewriting rules define how the proxy server rewrites URLs. Responses
that have been redirected by target servers typically return a 302
status code with a location header that defines the URL that the
client should be redirected to. Rewriting this URL is necessary if the
target server is not aware of the proxy servers. The redirected URL is
modified to correctly point clients to the proxy server instead of
directly to a target server that may not be visible to clients. Use
the following properties to configure the URL rewriting rules for a
proxy server
Avoid trouble: The proxy server only supports rewriting redirected
responses. Therefore, these the following settings only apply to
redirected responses. These settings do not apply to requests because
the proxy server does not support URL rewriting for requests.
I had the same issue
It looks like WAS plug-in in not friendly with mod_rewrite
So WAS module declaration (LoadModule was_ap22_module ...) was moved to the bottom of httpd.conf
In my case it helped
We have a .net 3.5 application (MVC and WebForms mixed) that was hosted on IIS6. In order to make it work on IIS6 we had to add custom mappings to IIS such that *.MVC would map to aspnet_isapi.dll.
So our URL's would end up looking like this:
<host>\someController.mvc\action
But now that were setting this web app up on IIS7, with classic mode pooling, were trying to do the same thing so that we don't have to change anything about the application.
But after adding the *.MVC Handler mapping in IIS7 it still does not seem to be picking it up. Every time we navigate to our MVC pages, we get 404 errors. However, our .aspx pages load fine.
On closer inspection the Failed Request Tracing keeps complaining about the following
ModuleName="IIS Web Core", Notification="MAP_REQUEST_HANDLER", HttpStatus="404", HttpReason="Not Found", HttpSubStatus="0", ErrorCode="The system cannot find the file specified.
(0x80070002)", ConfigExceptionInfo=""
I'm running in circles. We were able to set this up on another IIS7 machine yet this one were trying to set it up on just refuses to work. I really don't know what I'm missing. Its like the mapping rule is not triggering at all. Because the same error occurs if we just type in random things for the file name in the URL.
I just dealt with this, and what really did it for me was getting rid of the entire MvcHttpHandler (remove it from your
<system.webServer>/<handlers>
configuration tag).
MSDN states that this handler is only useful when the UrlRoutingModule is not enabled for all requests (which in IIS7+ we can), hence why it's useful for IIS6 (and also why we need the *.mvc extension to route properly).
So just remove the MvcHttpHandler reference in your handlers, and make sure you:
Have the application running in an app pool with Integrated Mode (not Classic)
You have the runAllManagedModulesForAllRequests modules attribute set to "true"
<modules runAllManagedModulesForAllRequests="true">
If you are still getting 404's then it's either your MVC doing it (which really sidetracked me :S) another reason.