Hello friends...
I have a .htaccess for url rewriting that looks like this:
Options +FollowSymlinks
RewriteEngine On
RewriteRule ^(.*)\ms.htm $ $manage_student.php [nc]'
The code above gives me an error msg: "Error 500"
I am using apache 5.5.
Can anybody help me with my url rewriting?
...
I have a private folder on my domain like
http://example.com/protected
and i stored lot of images and pdf file there
/protected/pad1.pdf
/protected/pad2.pdf
/protected/pad1.png
/protected/pad1.png
supose these are the files, how can i hide or protect access to there files with the help of .htaccess file.
allow only users those...
I am looking for the specific .htaccess command that will allow me to deny http access from everyone BUT my scripts.
I have a script that runs out of the root directory that goes and fetches all of the .jpg's out of a given protected directory with the following .htaccess file
<files *.jpg>
order allow, deny
deny from all
</fil...
Whats supposed to happen:
Any file requests in the root directory that are on the list are to be processed as is.
Any file requests in the /images/ directory are to be processed as is.
Anything else passed to the root directory (just the root directory) should be sent to viewpic.php?id= and then the request
What IS happening:
Everyt...
Currently what I have in my .htaccess file is this,
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.*).(css|js)$ /$1.$2.gz
My CSS and Javascript files have a number next to them such as example01.css and whenever I update them, I increase the number. Each time I do, I also have to update m...
In my script, this function parts build links:
if ($type == "mod_rewrite") {
$prepend = "";
$append = ".html";
} else if ($type == "query_string") {
$prepend = 'index.php?params=';
$append = "/";
}
//
//
//
$gamelink = 'game/id/gamename' (example)
/* 'game' is a fixed string.
'id' and 'gamename' are...
Options +FollowSymLinks -MultiViews -Indexes
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/$ $1.php
RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{...
First off I am using the Codeigniter Framework so this issue is a workaround the way CI process URLs along with the current redirects I have set up using mod_rewrite.
I am trying to get a URL like this /?gclid=somestringgoeshere to redirect to /index.php?/home/gclid/somestringgoeshere.
The current .htaccess I have set is below
<IfModu...
Hi,
I have the following problem. I have a website and a blog in a subdirectory. Both of them are php. I have a .htaccess file in the root folder and another one in the blog folder. I dont' think is relevant, but the blog script is wordpress.
I added a condition in the root .htaccess to skip the requests made for the blog,
rewriteCon...
I add to httpd.conf:
ServerAlias *.domain.com
Now I want only 1 subdomain: h.domain.com to load hobbies.php
Which lines do I need to add into my .htaccess file to make this happen?
...
For some unknown reason, my rewrite rule does not fire. Can you advise ?
/extranet/.htaccess (1)
/extranet/stable/
/extranet/dev/
/extranet/dev/.htaccess (2)
The first .htaccess redirects all traffic to the stable folder, except for URLs specifically pointed at the dev folder. That works fine.
Inside the dev folder, the second .htac...
I've built a new PHP site for a customer and want to redirect the top ranking Google results from the old site structure to the new one.
I've put several dozen Redirect 301's in a .htaccess in the documentroot, and while some work fine I'm having issues with a bunch of others.
This works fine:
Redirect 301 /nl/flash/banner_new.swf htt...
I'm not entirely sure if this is possible and tried searching but couldn't find the exact answer to my current situation.
I'm building a service which should allow users to point their own domain to the service. (they need to point an A record towards my server ip)
I'm able to catch the domain using the catch all in apache. So I made ...
I had the pleasure to take a peak at Wordpress source code; i was wondering how they managed the custom url feature, but i couldn't really get it.
The rewrite rules inside wordpress .htaccess file simply redirect all requests to index.php.
After that, it's a mystery to me: how do they make example.com/this/title/is/cool/ match index.ph...
Hello guys,
I'm trying to figure it out how to set up an .htaccess set of rules that would force the presence of the "www" in front of the domain if it is not initially specified, but at the same time, it will not have any effect if the an subdomain is pressent; all this without hard coding any domain name so that the script is portable...
The application i'm developing uses a certain file directory structure. Via the use of mod_rewrite and .htaccess files, i manage to have friendly urls for our users. It works fine on my local server, but once on the production server, it fails: apparently, the server throws a 404 error before the .htaccess has a chance to kick in.
Here ...
How do I use PHP to check whether a folder is password protected or not? I am using a PHP script that check for return codes 401 and 403 but when it runs into a folder that is password protected it recognizes that its a 403 but does not allow the popup box for username and password to display? How do I detect that the folder is password ...
Hello everyone/
I am wondering wether it's possible to use .htaccess to rewrite a folder name.
What I mean is this.
Lets say I have a url like:
www.site.com/folder1/page.php
Now I want to rewrite the url to (for example)
www.site.com/apple/page.php
The folder1 is an existing folder on my webspace.
important: the "apple" is not a...
I am trying to understand how .htaccess redirects work.
Say for instance, my user navigates to:
www.website.com/users/bob
How can I redirect that user to:
www.website.com/users.php?user=bob
...
I’m trying to use the following .htaccess file
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^images/
RewriteRule (.*) view.php?picid=$1 [L]
RewriteRule ^/user/(.*)$ /users.php?user=$1
I want two things to happen: Whenever someon...