How can I test if IIRF works? - mod-rewrite

http://www.codeplex.com/IIRF/Thread/List.aspx
My webhost installed IIRF for me and I am convinced that they did not do it correctly. I've tried numerous examples including one that I know works with apache's mod_rewrite but I can't get anything to work with IIRF. Is there rule or configuration option that you guys have that you know of that will show whether or not the thing is working correctly?
Even something like rewrite all urls to anothersite.com will will help me right now. I hope you guys realize the reason I came for your help. I can figure out how to do the rewrite rules on my own but I don't know if the errors are because of me or the webhost. I have limited options as well since I am on a shared webhost.

The new version of IIRF, v1.2.16 R3, includes a StatusUrl directive that will give you a status page if you do an HTTP GET on it. It looks like this:
If you get that page, then IIRF is running.

This is tested and working with IIRF:
RedirectRule ^.*$ http://www.google.com/ [I,R=301]
It will match any URL and redirect to Google.

Related

TYPO3 HTTPS://www. redirects to Page Not Found

Hope that someone can help me solve this strange https:// behaviour in TYPO3 8.7.2 (and 7.6)
All https:// referrers are working fine. The only one giving a problem is the https://www.hocom-advies.nl which produces an url like this:
https://www.hocom-advies.nl/hocom-advies.nl which results in a TYPO3 error: Page not found! ??
I have all rewriting in my Vhost. Only some basic TYPO3 rewrite stuff in the .htaccess file. And some basic TS lines in the config.
The same https request on an other TYPO3 8.7.2 system is working ok! Both settings in the VHost and TSconfig are equal.
So where to look for here? Any idea? Thanks.
your domain duplication can have multiple reasons:
have you configured config.absRefPrefix = / (or have you inserted your domain?)
don't use baseURL!
are your rewrites clean? (no missing protocols?)
do you generate links without protocol?

mod_rewrite subdomain in Symfony2

Please help with mod_rewrite subdomain to some Symfony2 routing. It is like 3 months now I spent time to solve this with my Symfony2 project but after reading tons of apache mod_rewrite and mod_alias documentation and trying hundreds of examples... it still doesn't work!
What I try to solve is, when user enter address of some specific subdomain:
XXXXXXX.example.com
He sees content that is actually under
www.domain.com/tag/XXXXXXX/
but he is not redirected or URL isn't changed -- it should just stay XXXXXX.example.com as he enters.
I need to resolve this with Apache VirtualHost and sites-enabled file (not with SubdomainListener) but the most I can solve on my own with mod_rewrite is having
XXXXXXX.example.com
Rewriting (transparently) itself to
XXXXXXXX.example.com/tag/XXXXXXXX or
XXXXXXXX.example.com/app.php/tag/XXXXXXXX/
which of course is not what I try to achieve. I try to achieve internal (http://httpd.apache.org/docs/2.2/rewrite/remapping.html) redirection so user don't see that. Any help with working soultions would be otherworldly appreciated.
Since this commit, you can use subdomains in Symfony natively, but unfortunately it's a Symfony 2.2 feature. If you need subdomains, this still is the best way to do this, however.

discover if mod_rewrite is working (MAMP + codeigniter)

I'm experimenting (and having problems!) with codeigniter.
In particular, links do not work.
even if they are correct (eg. http://localhost/ci-book/welcome/cat/3, where welcome is controller, cat the method), they can't be open and chrome says "Oops! This link appears to be broken...."
Someone suggested to check that mod_rewrite is working. How can I do that?
I'm using Mamp.
thanks,
P.
First, check that the basic URL without mod_rewrite works: http://localhost/ci-book/index.php?welcome/cat/3
Then setup mod_rewrite, restart httpd, and attempt to navigate back to your URL. If it works (or at least, if part of the page loads with errors), then mod_rewrite is working.

Problem when removing index.php from url

dont worry it is not an another how to remove index.php from url question!! :D
i researched and made according to tutorials; here is my source
http://codeigniter.com/wiki/mod_rewrite/
im sure about all steps, but when run it, i dont see any error messageā€¦ url changes like
www.blablabla.com/contact
www.blablabla.com/about
but it always display homepage :/ thats weird!!
what can be problem? any idea?
thanks a lot! appreciate helps!!
if it always displays the home page it could be that your application isn't configured properly.
Check the system/application/config/config.php file and find the $config['uri_protocol'] option.
If you notice, in the comments there are a number of options you can try. I've found that sometimes on different servers I need to try different options before it will work (I think it's something to do with the PHP configuration, the AUTO option doesn't always get it right).

Friendly urls not working - modrewrite enabled. what gives?

I'm trying to install SilverStripe and during the installation, it returns an error saying that friendly links aren't working. However mod_rewrite is enabled and AllowOverride is set to All. I'm using CentOS Linux on a dedicated server with Webmin as the cp (yes, I know.. not my choice).
The installer should have set things up as best it can, even if you receive that error message.
This question is a little tricky to answer because the problem could lie in a number of different places, but I've tried to put together a troubleshooting guide below.
Note: Many of the links below have been deliberately broken because Stack Overflow think I might be a spammer. ;-)
Assuming that your site is at http:/www.example.com, try visiting http:/www.example.com/dev/build - you should see a page with a heading "Environment Builder (formerly db/build)". If that works, then you have no problems with rewrite, and the installer gave you that message in error.
If that gives you a 404, try http:/www.example.com/sapphire/main.php?url=dev/build - this will visit the same feature, but bypasses mod_rewrite. If that gives you the heading "Environment Builder (formerly db/build)" and the previous URL didn't, then you have a problem with mod_rewrite and not some other problem.
Check the content of your .htaccess file. It should look something like this but may have RewriteBase line.
Try putting some junk text - e.g. 'asdfsahjadsfasdf' - into the .htaccess file and saving. Open your site. Does it give you a 500 error? If not, then your AllowOverride All setting isn't working. Check that you have set it in the right place. Remember - it needs to be in your Apache config file, and not the .htaccess. If you don't have access to the relevant config files you might need to ask your ISP to help you answer this question.
If that doesn't uncover the issue, we'll have to tinker with the rewrite rules to see if we can explore what's going on. Try changing this line:
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
To this (it will turn the rewrite rules into redirection rules):
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L,R]
Visit http:/www.example.com/dev/build again Did it redirect anywhere? If not, then mod_rewrite isn't working. It should be redirecting to http:/www.example.com/sapphire/main.php?url=dev/build. Is it redirecting somewhere else? For example, has extra junk been inserted into the ?url= parameter? This can sometimes happen if you are running SilverStripe in a subdirectory. In this case, check that the RewriteBase setting is set that subdirectory. Something like RewriteBase /mysubdir.
If you're still unable to get friendly URLs working, then congratulations - you've found a really nasty edge-case! Post the details of what you discovered following the steps above to the SilverStripe IRC channel or Forum on www.silverstripe.org.
Step 1. Put some garbage in your .htaccess file and see if the web server gives you an error.
The point here being to find out - assuming the server is running Apache - whether the .htaccess file the SS installer generated is actually being read. If you've still problems, try asking on the SS IRC channel.

Resources