Hi,
In order to make nice and friendly SEO links I'm using this:
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)\.html$ page.php?ida=$1&idb=$2 [QSA]
So http://www.example.com/solutions/hardware.html will be: http://www.example.com/page.php?ida=solutions&idb=hardware
This works.
But the pro...
I am having some issues with mod_rewrite on a new Apache dev PC I have set up.
I have enabled mod_rewrite as an apache module and editted the conf file to allow rewriting, however when I try creating rewrites nothing happens. The htaccess file is being invoked to some extent as I am able to cause a 500 error by putting invalid syntax i...
I'm trying to create a MVC framework when I noticed the $_SERVER['PATH_TRANSLATED'] variable is doing this:
[PATH_INFO] => /test/test2/test3
[PATH_TRANSLATED] => redirect:/index.php/test/test2/test3/test2/test3
This is when I'm accessing the PHP file by http://domain.tld/test/test2/test3
Notice how it is repeating after /test/
T...
I'm trying to migrate a working ExpressionEngine installation from an Apache environment over to an NginX environment on a different box. I have come across a problem trying to convert some .htaccess rewrites to NginX.
The site uses the multi language module so needs a custom rewrite rule for every additional language.
This is my stand...
Hello. I have image hosting. All image requests redirect to a PHP script with mod_rewrite. PHP script uses function fread() and displays picture from another file. I want to know, does this use a lot of processor time or not?
...
I am using Apache to rewrite my URLs into clean URLs.
RewriteRule ^(.*) index.php
Currently this rewrites directories too, which is what I want, since I want everything run through my router/index.php file.
What I would like to do however, is have one folder that I can access directly. This is for lib files such as .js and .css file...
Hi all, i'm struggling with an htaccess rewrite command
what I have is
RewriteCond %{HTTP_HOST} ^www.mywebsite.co.uk$
RewriteCond %{REQUEST_URI} !^/subfolder/
RewriteRule ^(.*)$ /subfolder/
I have a few URLs going to the same folder, some of them redirect to subfolders, which then run different templates. However, I also need to ap...
My htaccess doesn't quite work:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\.php$ /blah/$1 [R=301,L]
RewriteRule ^(.*)$ /blah/index.php/$1 [L]
Basically /blah/about.php should redirect to /blah/about
I'm using codeigniter so the last line is required to process URL's.
Th...
For http://macintosh.local/clientname/102
I can get the numeric reference (3 digits) like this:
RewriteRule ^[^/]+/([0-9]{3}+)/?$ album.php?ref=$1 [L]
Now I want to get my reference in my SEO URL:
http://macintosh.local/clientname/102-some-keywords
...
I have a url http://domain.com/module/controller/action/get1/value1/?get2=value2&get3=value3 I want to use Mod_Rewrite to change the ?&= to appropriate / slashes inline with the first GET variable.
I also need to avoid conflicts with my current Mod_Rewrite rules:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond ...
Hello
I need your help. I want to test if the url is entered without www
like example.com it should be forwarded to www.example.com
...
Should request: site.ru/index.php?go=23&page=bla
alter the form: bla.site.ru/index.php?go=23
That is, the user types in browser bla.site.ru/index.php?go=23 and all information is passed to scripts that request site.ru/index.php?go=23&page=bla
It is prohibited to use redirect
...
I have a website deployed on two hosts: one in the root path the other one in the sub path
For example
http://one.example.com/xyz => maps to /var/www/
http://two.example.com/subpath1/subpath2/ => maps to /var/www/subpath1/subpath2/
Now I want to permanently redirect abc.php to index.php on the hosts
http://one.example.com/xyz/abc....
i have an applicaiton that runs at actionengineers.com:3000. How do i reqwite the application to a subdomain or directory (actionengineers.com/myapp) without disturbing the main site of course. i tried to use .htaccess file but i allways get eror 404. here is the code in the .htaccess file.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www...
This is the new version being used by wordpress...
RewriteEngine On
RewriteBase BASE/
#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]
# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin...
I have the following in my .htaccess currently-
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^go/([^/]*)/([0-9]+)/([0-9]+)/?$ http://foo.com/wp-content/plugins/foo/cloak.php?post_id=$2&link_num=$3&cloaked_url=$0 [L]
RewriteRule ^go/([^/]+)[/]?$ http://foo.com/wp-content/plugins/foo/cloak.php?name=$1&cloaked_url=$0 [...
I've got a url - http://callisto/news/1st_February_is_here... - which has three trailing dots, but by the time it gets passed through mod_rewrite and reaches the script (in $_GET) the dots have been removed (but the rest of the string is OK).
This is the htaccess rule:
RewriteRule ^([^/]+)/(.*)$ index.php?__action=site&__filter=$1&__pa...
I'm trying to set up a .htaccess file to redirect pages from one domain to another. Works in 99% of cases, the RewriteRules that aren't working are like the one below - if the outbound URL has an #anchor tag, the # symbol is converted into the characters %23 in the browser and then the page does not load at the anchor. Any idea on how to...
I really hope someone knows what I'm doing wrong here, cuz I sure don't!
We have a certain page on our site which has account balance information on it, and we want to make it secure with SSL. But we only want this one particular page to be secure. I have the following in the localhost:80 virtualhost, and it works perfect:
RewriteCon...
I installed drupal on my site at say, example.co.uk/portfolio.
All the links are showing as example.co.uk/portfolio/project-1.
I want it to be example.co.uk/project-1
How can I use rewrite rules or whatever so that wherever there is a link that has the /portfolio directory showing, that it will not show it in the href at all? I want t...