I have this in my .htaccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
I want this rule to NOT run if the url has /Users or /Forums in the url.
How can I do this?
Upda...
I'm trying to figure out what the best way to go about rewriting urls to accommodate not only a directory structure, but appended actions for a menu for a site I'm building in PHP.
I have one page that dynamically loads content based on whatever "page" is being loaded. Includes are pulled based on what the page is. Right now that's tied...
we have a url for eg https://www.egdomain.com/ and the ssl is valid for egdomain.com.
so how can i redirect all the requests from https://www.egdomain.com/ to https://egdomain.com/
the site also has normal http requests which works fine.
I tried the htaccess below but still nothing
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
Rewrite...
Hi,
my URL looks like
page.html?L=0&a=1&b=2&c=6 OR
page.html?a=1&b=2&L=0&c=6 OR
page.html?a=1&b=2&c=6&L=0
I need to delete the L=0, where L can be either 0 or 1. But I need to keep all other params. How can this be done?
...
Hi All,
This should be simple but I cannot figure it out. I have this very simple mod_rewrite rule and it just doesn't want to work. This is the entire contents of the .htaccess file.
RewriteEngine On
RewriteRule ^([A-Za-z0-9-_/\.]+)/?$ index.php?page=$1 [L]
If I call the URL domain.com/foo it should rewrite it to index.php?page=foo....
Hi,
I would like to create virtual subdomains through htaccess in the following way.
Entering:
http://testuser.domain.com/1/2/3/
Should be processed as:
http://www.domain.com/user.php?id=testuser&var1=1&var2=2&var3=3
HOWEVER, this rewrite should not use user.php, but index.php, in case someone enters:
http://www.dom...
Hi There,
I'm trying to make the following redirection (301) using .htaccess
*?page=1 redirects to *
(where * is a wildcard).
Basically, I just want to prevent anyone accessing a page with ?page=1 at the end of the URL, and instead direct them to the same url minus '?page=1'.
Is there a quick way of doing this?
Many thanks!
...
Hi,
According to Apache bugtracker, the B flag was fixed in version 2.2.9
https://issues.apache.org/bugzilla/show_bug.cgi?id=45529
How safe is it to use this B flag? If I include it in the next release of our software, can I rest assured that the majority of hostings will work fine with this?
...
I have a Django application being served of (say) example.com. It contains a number of sub-applications (say) strength, speed and skill. The URL scheme is something like http://example.com/strength, http://example.com/speed and http://example.com/skill. This is how I run my dev server (using runserver) and there are no problems whatsoeve...
I have a URL like so:
http://example.com/one/?ACT=123&gateway=mygateway&method=mymethod&orderID=303&currency=EUR&amount=11&PM=CreditCard&ACCEPTANCE=test123&STATUS=9&CARDNO=XXXXXXXXXXXX1111&ED=0517&CN=Test+test&TRXDATE=08%2F12%2F10&PAYID=7963938&NCERROR=0&BRAND=VISA&ECI=7&a...
Is there a way use mod_rewrite to produce the result below?
Original URL:
http://www.domain.com/shop.php?id=newyork
to
SEO friendly URL
http://www.domain.com/newyork
I've seen plenty of example where the above URL can be converted to http://www.domain.com/shop/newyork but I actually don't want to display the word 'shop/' so just http...
Hi There,
I want to redirect users from a URL formatted like this:
http://blog.mysite.com/any/number/of/directories/<POSTNAME>.html
TO:
http://mysite.com/about/blog/entry/<POSTNAME>/
Where is the same hyphen-separated string, and, the original URL can have any number of directories before the filename (none of which a...
I posted a question the other day about how to change the displayed URL on a Wordpress-generated page, specifically from something like "mysite.com/?cat=3" to just "mysite.com". I got a few replies that steered me towards doing some type of redirect with .htacess. After some research and experimentation, I realized that it's not so muc...
I would like to rewrite a subdomain so it is passed as a querystring to a site. Take the following scenario.
IIS Config:
Site A (bindings: *, site-a.com)
Site B (bindings: site-b.com)
Rewrite rules:
"sub1.site-a.com" -- rewrite to -> "site-a.com"
"sub2.site-a.com" -- rewrite to -> "site-a.com"
"sub1.site-b.com" -- rewrite to -> "site-...
What is the correct way to write out the .htacess so that both www.domain.com/about_us and www.domain.com/about_us/ goes to www.domain.com/about_us.php
Currently, what I have is the below and just wonder if there's a way to put it in one line
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(about)$ /about_us.php
RewriteRule ^(abo...
Hey all,
I have this setup ..
/plain index file
/sub_dir1
/sub_dir2 (<-subdomain)
/sub_dir3
/blog (<-wordpress)
/etc/
but want this ..
/wordpress
/sub_dir1
/sub_dir2 (<-subdomain)
/sub_dir3
/etc/
Is this possible with wordpress' rewrite rules etc?
Any advice on the Apache rules?
Cheers,
Jeremy
...
Hi!
I am working on a very dynamic system where i have two identical htaccess files in / and in /somepath. The reason for this that the domain could be pointed into /somepath, but i never know if it is.
When it is pointed to /somepath there are no problems, but when its not it seems like when i request /somepath/page/foo/bar the htacc...
i am writing a site from scratch using php/mysql and am using GET requests to pass data between the pages.
at the moment my links look like:
http://pkh:55/?service=213971&type=FSD
but i would like to use mod_rewrite to make them more relevant, ie:
http://pkh:55/FSD/services/football-youth-club/
i've had a look through the word...
We are moving from one site language/CMS (coldfusion/custom) to another (PHP/Drupal) and need to have some of our old pages redirected to new ones. I have access to both the .htaccess and httpd.conf (and apache2.conf) as this is a vps on Linode.
Most of them cannot be done via regular expression (they contain GUIDs in the URL) and we're...
I wasn't sure what the title should be but its s simple concept but I'm useless with .htaccess rewrites.
I currently have:
RewriteRule ^([a-zA-z0-9_-]+)/?$ index.php?page=$1
which will happily send all requests to my index and I can do what I want.
I have:
RewriteRule ^events/([a-zA-Z0-9-./]+)/?$ index.php?page=events/index&id=$1
...