I'd like to be able to get some websites currently hosted in linux moved across to Windows-based hosting where we already have a reasonable number of sites hosted (not looking to switch to Apache since majority of sites are relying upon IIS), and have tried a few different mod_rewrite variants for IIS but not had any success getting any ...
I have a Windows/Apache/PHP environment set up to imitate a shared hosting account but cannot get mod_alias and mod_rewrite to play nicely with one another. Both are definitely enabled at the server level and on a per-site basis.
I have d:\web\public_html\ set up as DocumentRoot. But generally speaking it will be empty.
I have d:\web\s...
I'm trying to do the basic mod_rewrite clean URL trick, where /category/item rewrites to /category/index.php?id=item. In the /category directory, I have this in my .htaccess file:
Options +FollowSymLinks
RewriteEngine on
RewriteBase /category/
RewriteRule ^(.+)$ index.php?id=$1 [L]
It sends the request to the index.php script jus...
Could anyone explain the following line please?
RewriteRule ^(.*)$ /index.php/$1 [L]
Thanks in advance.
...
I have Django set up on my server at http://stevencampbell.org/
I want to be able to run WordPress at stevencampbell.org/blog/
I'm running all my Python and Django files through Fast_CGI (only Django option on my server). My .htaccess file looks like this:
AddHandler fastcgi-script .fcgi
RewriteEngine On
RewriteRule ^(/media.*)$ /$1 [...
I've been banging my head against this problem for nearly two days now, and I'm hoping someone on this site can help me.
I live in China and have a server (shared hosting) located in Hong Kong. I've set up a PHP Twitter proxy on the server, and I connect to the proxy using Twitter for iPhone (AKA Tweetie). It's worked beautifully for th...
Hello,
I am trying to make clean URLs. I have written a simple rule on the .htaccess file and I have been told that it should work. However, it does not. I was wondering if it might have something to so with mod_rewrite not being enabled.
I am using Network Solutions shared hosting. I called the company and was told that mod_rewrit...
Hello,
If I understand correctly, I need to put something in php.ini to enable mod_rewrite.
If this is true, what do I need to put in php.ini?
Thanks in advance,
John
...
Hello,
I am trying to re-write this:
http://www.domain.com/sample/comments/68
Into this:
http://www.domain.com/sample/comments/index.php?submissionid=68
Here is what the .htaccess file looks like in both the directory represented by "sample" above and the directory "comments":
RewriteEngine on
RewriteRule ^comments/([0-9]+)?$ ind...
I am using a .htaccess file to direct requests for a directory to a custom php file that provides info about that directory (and i want the url displayed by the browser to not change).
Here is the relevant part of the .htaccess file.
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ /myphp.php?url=%{REQUEST_URI} [QSA,L]
This wor...
I'm sure this is probably really simple, but my knowledge really isn't good in this area, and I don't seem to be able to get it right.
I have the following file structure:
/cms (renamed from system)
cms.php (renamed from index.php, added to DirectoryIndex in .htaccess)
.htaccess
index.html
page1.html
/css
/js
I also have the .htacce...
Is there a way to make a rewrite rule to file located in a different than DocumentRoot path? Say I have domain http://test.ldt/ with DocumentRoot */home/test_ltd/* and I want that when a file is requested under static. subdomain (http://stats.test.ldt/) it would look for requested file from another path, say /home/static_files/
I was ad...
Hi,
I am using a CMS that hosts multiple websites simultaneously and I am seeking a method to properly serve sitemap.xml files for each site. I have concluded that a mod-rewrite rule will be the most effective solution for this.
My idea is to have a /sitemaps/ directory with the site map for each domain named as the domain name, i.e. /...
Hello,
I have a hyperlink that looks like this:
http://domain.com/sample/comments/65
And when I click on it, it goes to this:
http://domain.com/sample/comments/index.php?submissionid=65
I'm using a rewrite rule to make it do this. This is what I want, except I also want the URL displayed in the browser to still look like "http://...
I have a directory that lists products by categories. if a _GET variable exists, it is used in a query. I would like to use "pretty url's", like: example/a/1/b/2/c/3/d/4 becomes example/index.html?a=1&b=2&c=3&d=4
most .htaccess examples I see only use variables to replace the _GET values, but I can use rules like this:
Options +Follow...
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z0-9_-]+)\.html$ product.php?pid=$1&rewrite=1&%{QUERY_STRING} [L,QSA,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z0-9_-]+)\.html$ product2.php?cid=$1&rewrite=1&%{QUERY_STRING} [L,QSA,NC]
R...
I want to have URLs like :-
URL 1 - www.projectname/module/search/param/1
URL 2 - www.projectname/param/1/module/search
I want a PHP code which takes the above URLs as parameter and returns an array like
Array("module" => "search", "param" => 1) (for URL 1)
Array("param" => 1, "module" => "search") (for URL 2)
So that I can u...
I have a site which redirects all requests for files/folders which don't exist to an index file using .htaccess:
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule !admin/* index.php [NC,L]
There is a folder "admin/" which has the f...
I have a vague idea on how to solve this, but really need a push :)
I have a Django app running with apache (mod_wsgi). Today urls look like this:
http://site.com/category/A/product/B/
What I would like to do is this:
http://A.site.com/product/B
This means that the url dispatcher some how needs to pick up the value found in the subdo...
i have this on my htaccess currently:
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/www/
RewriteRule (.*) /www/$1/index.php
but i keep getting an error page
what im trying to do is to register a lot of domains for clients
and just store all their websites' files on a folder named "theirdomain.com" on my domain's www folder.
...