I have a solution but it is one that I know is not the greatest and would better be solved with a full rewrite. Basically I have 3 rewrites that will go to the correct areas I want and do what they need to do. However in order to switch between where I need to go I had to write a URI class to strip through the url set the page and vars...
I know how to force http to https, and I know how to use htpasswd to force someone to login to the site. But I need a combination of this. Basically the site needs to be forced to https, and then the authentication needs to happen. Therefore there will be no http access to the site whatsoever.
Can anyone supply me with working htaccess ...
I have this mod-rewrite in my htacces which enables some clean urls;
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
### LANGUAGE REDIRECT RULES start
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(en|nl)-?()?\/(.*\/?)$ index.php?language=$1®ion=$2&symphony-page=$3&%{QUERY_STRING} [L]
...
I'm curious, is there a more efficient way to do the the following? Right now it works great, just seems like overkill...
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !\.(gif|jpe?g|png|js|css|swf|php|ico|txt|pdf)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond...
Hi, I'm in trouble with the internal wordpress rewrite rules.
I've read this thread but I still can't get any results: http://stackoverflow.com/questions/2210826/need-help-with-wp-rewrite-in-a-wordpress-plugin
I explain my situation:
1) I have a page_template called 'myplugin_template.php' associated to a wordpress page called "mypage"...
Hi,
I have a rule,
RewriteRule ^([^/]*)/Strain/([^/]*)/([^/]*)-([^/]*)$ /strain.php?id=$3&strain=$4&source=$2&area=$1 [L]
However, having the "Strain" in there doesn't seem to work. What would be the correct syntax for a hard-coded directory name?
Thanks :) Any help is much appreciated
EDIT: eg,http://mysite.com/San-Diego/Store-Nam...
This is my original, working, script. Unless the request is a file that exists you get sent to the index page.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteRule .* /n/index.php [NC]
Now I want to add in support for variables on a specific page where all the requests will look like this:
abc/def/integer
and i want...
I currently have
RewriteEngine On
RewriteBase /
# RewriteRule index\.cgi/(.*) /$1 [R=301,L,NS]
RewriteRule . index.cgi [L]
I cannot understand why the active rule redirects everything from abc to index.cgi/abc, even though the R directive is not present.
This is supposed to produce an internal redirect.
...
I'm working on some rewrite rules, and for some reason a regexp I'm not expecting to pass (and does pass not on any of my regexp testers) is passing in mod_rewrite.
The URL in question is:
http://url.com/api/projects.json?division=aa
And the rewrite rule is:
RewriteEngine On
RewriteBase /
RewriteRule ^api\/([^.?#/%\s]+)\.([^#?\s]+)$...
Hi all,
I have here a subdomain which i wish to pass on.
here the example of url : http://subdomain.domain.com/login
and it should point to : http://subdomain.domain.com/index.php/login
i write a simple htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 !^(index\.php|images|robots\.txt|css|javascript)
Rewri...
Hi, I would like to rewrite the following URL:
mypage/1234/myaction?api_key=4567
to:
api/myaction.php?id=1234&api_key=4567
...using mod-rewrite. I can get /mypage/1234/myaction -> api/myaction.php?id=1234, but the extra get parameter is causing some problems....
Any ideas?
...
I'm creating an online community and I'm trying to set up a development server.
Currently, I'm using GIT as my repository. I have both mysite.com and mysite.net; the .com being the primary site.
My Goal:
If a user goes to www.mysite.net they
should be 301 redirected to
www.mysite.com.
If a user goes to dev.mysite.net they should b...
I currently use register.php?referal=gamestand on my website so that when the user visits my website through the referal website, I can track how many players have registered from that place.
referal=gamestand will automatically fill in an input textfield within the registration process using echo $_GET['code'];
The problem is... on Go...
Somebody told me that example.com/en is more friendly than example.com/index.php?lang=en.
How can I change my URL last part from ?lang=en to /en/?
(pd: I don't want to use gettext or any framework like zend to accomplish this)
This is how I'm internationalizing and localizing my web page:
(live example: alexchen.co.nr/)
lang.php:
<?...
Hi all,
I recently discovered mod rewrite and I was wondering if it's possible
to rewrite a variable which contains an outbound url.
So far it is not working at all. I assume it is caused because of the special characters in the variable and I have no clue how I can solve this.
My .htaccess code so far:
Options +FollowSymLinks
Rewr...
Hi,
recently, I have been working on a small project for a client. I was thinking about using a wordpress style pretty URL format. I googled around a lot and came accross Apache’s mod_rewrite and RewriteRule, RewriteCond. But didn't find any example which can handle random of parameters. For example:
/index.php?param=1 → /index/param/...
I have a PHP script and I'd like to know if it's been executed as a result of mod_rewrite redirecting the request to it.
Is there anything I can easily inspect simply to get a yes or no answer? Is there any way to get the rewritten path rather than the one that was originally requested?
...
I'm trying to rewrite URLs to a generic show_page.php script, but I'm having trouble redirecting the root URL. I've been searching Google and stackoverflow but all I've come across implies that ^$ will redirect the root, but for some reason it doesn't. All I get is a 403 Forbidden (since I have indexes turned off).
Here's my current .ht...
I use lunarpages for my hosting, and can have multiple websites added on. When I add a new website, it creates a directory in where my current site exists
ie my site is jeffkilroy.com, if I make a domain for hello.com, it now also exists at jeffkilroy.com/hello
This is fine except I would like to organize it a bit better so that the si...
I'm trying to point a subfolder from one domain to another on my vhost (mediatemple). I want to use internal rewrites, not 301 redirects. Here's the goal
http://www.clientdomain.com/blog/$1 --> http://www.mydomain.com/wpmu/clientdomain/$1
On the server side, the structure looks like this:
/x/y/z/domains/clientdomain.com/html/blog/ --...