Search Results

Search found 906 results on 37 pages for 'rewriteengine'.

Page 12/37 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • how to remove index.php from url in codeigniter ?

    - by Mehdy
    how to remove index.php from my url in codeigniter . i remove index.php from my config file and i have run my rewrite_module in apache(2.2.11) and my .htaccess file is RewriteEngine on RewriteCond $1 !^(index\.php|images|captcha|css|js|robots\.txt) RewriteRule ^(.*)$ /index.php/$1 [L] now whenever i click any link it show that request url don't found . so please tell me what is the problem ?

    Read the article

  • rewrite rule is not working in .htaccess file

    - by deepu sankar
    in my portal i call a pdf file, path looks like http://www.mysite.com/filespath/books/online_bliss_in_five_simple_steps_1339668056/live/online_dating_bliss_in_five_simple_steps_1339668056.php for user acceptance i need to reduce this url. then i add a code in .htaccess file. after adding this line only a white page is displaying when i call my portal the code is RewriteEngine On RewriteRule ^book/([A-Za-z0-9-]+_.)/?$ /live/$1.php [NC,L] please help me

    Read the article

  • .htaccess mod force extra characters

    - by user1090809
    I need to be able to write/post links on the web that look like 'mysite.com/?d=foo', and take the user to filepath '/foo.php'. Here is my htaccess: RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^([^/]+)/$ $1.php [L] RewriteRule ^([^/]+(/[^/]+)*)/$ /$1.php [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$ RewriteRule ^([^.]+[^/.])$ /$1/ [R=301,L,NC] Baically I need to "force" '/?d=' before the filename, kinda like I've already modded my htaccess to force a trailing slash. How do I need to reconstruct my htaccess to make that possible?

    Read the article

  • htaccess Rewrite Rule duplicate - help me out please / RewriteRule ^(.*)\+apple\+fruit/$ ?q=$1 [L]

    - by elmaso
    Hello, I have this code in my .htaccess: Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteRule ^(.*)\+apple\+fruit/$ ?q=$1 [L] this turns the searchquery in /keyword+apple+fruit/ thats ok.. the only problem is, if I type in /keyword+apple+fruit +any+text+haha+ apple+fruit/ the htacces is showing content - but I don't want that. is there any command to say - ok apple + fruit only one time in the url and the second time send a 404 or show nothing.. thank you!!

    Read the article

  • .htaccess error while url forwarding

    - by Jean
    Hello, Here is the .htaccess entry. what I intended to do is to transfer anyone typing as www.yahoo.com/Hello to www.yahoo.com/index.php?h=hello. Options +FollowSymLinks RewriteEngine on RewriteBase / RewriteRule /index.php?u=$1 Now for some reason it shows me a 404 error when I type in yahoo.com too, I wonder what is wrong. Thanks Jean

    Read the article

  • Configure mod_jk with mod_rewrite

    - by Ayyappan
    Dear all Is there any way to configure both mod_jk and .htaccess in a same call what are the steps follow plz replay me httpd.conf ServerAdmin "[email protected]" ServerName www.vpaycash.in MIMEMagicFile /dev/null CustomLog logs/vpaycash.in_access_log "%h %l %u %t \"%r\" %s %b\"%{Referer}i\" \"%{User-agent}i\"" ErrorLog logs/vpaycash.in_error_log DocumentRoot "/home/vpaycashinadmin/webapps" Options +Indexes +FollowSymLinks Order allow,deny Allow from all AllowOverride All JkMount /* wlb JkMount /*.faces wlb JkMount /*.html wlb JkMount /*.iface wlb JkMount /*.jspx wlb JkMount /TestFilter wlb JkMount /block/* wlb JkMount /xmlhttp/* wlb Alias /usage "/home/vpaycashinadmin/public_html/usage" Order allow,deny Allow from all .htacess RewriteEngine on RewriteRule ^index.html$ index.iface

    Read the article

  • Apache mod_rewrite - prefer files over directories with pretty URLs

    - by Jesse
    I want to have pretty urls so http://www.domain.com/foo will return http://www.domain.com/foo.php The issue is that there is a directory that has the same name. I have another page at http://www.domain.com/foo/bar/baz and right now my server just returns the directory listing of foo when I request http://www.domain.com/foo Pseudocode: If the request plus ".php" is a file rewrite out the file instead of the directory Actual Code: RewriteEngine On RewriteBase / RewriteCond %{SCRIPT_FILENAME}\.php -f RewriteRule (.*) $1.php [NC,L]

    Read the article

  • Htaccess to force use WWW for mutlidomain.

    - by Uchiha Itachi
    I found this code to force using www. RewriteEngine On RewriteCond %{HTTP_HOST} !^www.example.com$ RewriteRule ^(.*)$ http://www.example.com/$1 [R=301] But i have many domain that pointed same directory. So i need a version of this code for multiple domains. It must run on any domain, is it possible ?

    Read the article

  • Redirecting using 301 rule in .htaccess

    - by user220755
    I am having a problem with redirecting a page from example.com (to) www.example.com The code I have is: RewriteEngine on RewriteCond %{HTTP_HOST} ^subdomain\.domain\.com$ [NC] RewriteRule ^(.*)$ http://www.subdomain.domain.com/$1 [L,R=301] And it is not working, any help?

    Read the article

  • Use symfony 1.4 without changing apache configuration

    - by aRagnis
    Is it possible to set the /web directory as webroot whithout changing apache configuration file? I tried using the following .htaccess code, but if i go to localhost/module/, it displays 404 error. But if i go to localhost/web/module/ then everything works. <IfModule mod_rewrite.c> RewriteEngine on RewriteRule sf/(.*) lib/vendor/symfony/data/web/sf/$1 [L] RewriteRule ^$ web/ [L] RewriteRule (.*) web/$1 [L] </IfModule>

    Read the article

  • .htaccess: Rewrite Problem.

    - by Francesc
    Hi, I'm creating a website. I have this code in the .htaccess file: RewriteEngine On RewriteRule ^/([0-9][0-9])/$ /redirect.php?id=$1 But when I go to, for example /ASEi it says 404 Not Found What's the problem?

    Read the article

  • Redirect question using mod_rewrite (no extensions - root of site)

    - by alex
    Hi, I'm having a small problem with mod_rewrite I have the following in my .htacces: Options +FollowSymlinks RewriteEngine on RewriteRule ^(.+)\.htm$ index.php?name=$1 [NC] This is my index.php file: <?php echo $_GET['name]; ?> This works great for the following url: www.mySite.com/this is an example.htm this would display "this is an example" What i'm trying to do however, is get it to do the same, without the .htm extension: for example: www.mySite.com/this is an example Any ideas? (dont think it's relevant but i'm using xampp to test this)

    Read the article

  • htaccess: Redirect a Dynamic URL - Show only Static URL - Double Content

    - by elmaso
    Hi, I have a rewrite rule to get clean urls.. the only problem is, google shows some dynamic url and i dont want to serve dynamic urls. What I want: if a user types in the dynamic url, he gets redirected to the clean url.. example: http://www.example.com/?index=bananas (if someone types that in, he gets redirect to the url above) http://www.examplcom/bananas/ this is my htacces: Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond $1 !apple\+banana RewriteRule ^(.*)\+apple\+banana/$ ?q=$1 [L] thank you!!

    Read the article

  • .htaccess | Adding A Second Vanity URL

    - by Necro.
    I want to take my .htaccess file and add a second rule for another vanity URL as I already have one declaring the page. So how would I write it so I can go to my page, and the next vanity being a variable for a profile? Ex:// mywebsite.com/page/profile Here is my current .htaccess file. RewriteEngine On RewriteBase / RewriteRule ^([a-zA-Z0-9-]+)$ index.php?p=$1 [L] RewriteRule ^([a-zA-Z0-9-]+)/$ index.php?p=$1 [L]

    Read the article

  • From mod_rewrite to isapi_rewrite

    - by Ty
    Hi, I have a Modx htaccess file which needs to be rewritten from mod_rewrite to isapi_rewrite 2. Can someone please help me? The following lines need to be changed for isapi_rewrite 2: Options +FollowSymlinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_USER_AGENT} ^.internal\ dummy\ connection.$ [NC] RewriteRule .* - [F,L] RewriteRule ^(manager|assets) - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] Many thanks.

    Read the article

  • Do most shared hosts handle gzipped files?

    - by Matrym
    I get them theoretically, but I'm grappling with gzipping files in practice. How should I go about gzip compressing my files, and what needs to be done in order to use them on a shared host? Would the following work? RewriteEngine On RewriteBase / RewriteCond %{HTTP:Accept-Encoding} .*gzip.* RewriteRule ^/(.*)\.js$ /$1.js.gz [L] RewriteRule ^/(.*)\.css$ /$1.css.gz [L] AddEncoding x-gzip text.gz

    Read the article

  • How do I ignore a directory in mod_rewrite?

    - by eddowding
    I'm trying to have the modrewrite rules skip the directory vip. I've tried a number of things as you can see below, but to no avail. # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / #RewriteRule ^vip$ - [PT] RewriteRule ^vip/.$ - [PT] #RewriteCond %{REQUEST_URI} !/vip RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress How do I get modrewrite to entirely ignore the /vip/ directory so that all requests pass directly to the folder?

    Read the article

  • htaccess redirect any urls ending in .php to index

    - by Freddie
    I've set up my .htaccess so far as follows: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?page=$1 [QSA] My index.php loads the file from /pages, eg. index.php?page=home will load the page content from pages/home.php However - if someone went to pages/home.php the page loads without the headers etc. which is undesirable. What can I add to redirect any URLs ending in .php to just take the user to the homepage? Thanks

    Read the article

  • Simple Mod-Rewrite rule - single rule - file exists

    - by Andy Gee
    I have a very simple mod rewrite rule Options FollowSymLinks RewriteEngine On RewriteRule ^hosted/essws/([^/]*)/$ /hosted/essws/?key=$1 [L] I would like this rewrite to activate even if the file or directory exists. For example: The URL: http://localhost/hosted/essws/candy-sweets-buffet/ Will load: http://localhost/hosted/essws/index.php?key=candy-sweets-buffet Even though the directory /hosted/essws/candy-sweets-buffet/ exists. Any help would be much appreciated.

    Read the article

  • php download file slows

    - by hobbywebsite
    OK first off thanks for your time I wish I could give more than one point for this question. Problem: I have some music files on my site (.mp3) and I am using a php file to increment a database to count the number of downloads and to point to the file to download. For some reason this method starts at 350kb/s then slowly drops to 5kb/s which then the file says it will take 11hrs to complete. BUT if I go directly to the .mp3 file my browser brings up a player and then I can right click and "save as" which works fine complete download in 3mins. (Yes both during the same time for those that are thinking it's my connection or ISP and its not my server either.) So the only thing that I've been playing around with recently is the php.ini and the .htcaccess files. So without further ado, the php file, php.ini, and the .htcaccess: download.php <?php include("config.php"); include("opendb.php"); $filename = 'song_name'; $filedl = $filename . '.mp3'; $query = "UPDATE songs SET song_download=song_download+1 WHER song_linkname='$filename'"; mysql_query($query); header('Content-Disposition: attachment; filename='.basename($filedl)); header('Content-type: audio/mp3'); header('Content-Length: ' . filesize($filedl)); readfile('/music/' . $filename . '/' . $filedl); include("closedb.php"); ?> php.ini register_globals = off allow_url_fopen = off expose_php = Off max_input_time = 60 variables_order = "EGPCS" extension_dir = ./ upload_tmp_dir = /tmp precision = 12 SMTP = relay-hosting.secureserver.net url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset=" ; Defines the default timezone used by the date functions date.timezone = "America/Los_Angeles" .htaccess Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} !^(www.MindCollar.com)?$ [NC] RewriteRule (.*) http://www.MindCollar.com/$1 [R=301,L] <IfModule mod_rewrite.c> RewriteEngine On ErrorDocument 404 /errors/404.php ErrorDocument 403 /errors/403.php ErrorDocument 500 /errors/500.php </IfModule> Options -Indexes Options +FollowSymlinks <Files .htaccess> deny from all </Files> thanks for you time

    Read the article

  • .htaccess is not working at all

    - by shuja
    i want to change this url localhost/classAds/classInc/home.php to localhost/classAds/classInc/home/ for this i created .htacess file as follow, RewriteEngine On #Turn on the rewriting engine RewriteRule ^home/?$ home.php [NC,L] #Handle requests for "home" and put this file in C:\wamp\www\classAds and then C:\wamp\www\classAds\classInc but at both places it did not work,i checked Apache error log but nothing there. actually i an new to this thing.. any idea please??

    Read the article

  • Rewrite rules for wordpress 3.0 (multi-site) for nginx?

    - by Zebra10
    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$ RewriteRule ^(.+)$ $1/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule . - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . index.php [L] What would it look like in Nginx?

    Read the article

  • Rewrite URL based on file existence check

    - by Anthony Faull
    I need to redirect web requests of the form /{language}-{country}/{file} to: /{language}-{country}/{file} if it exists, otherwise /{language}/{file} if it exists, otherwise /en-US/{file} The existing .htaccess fulfils requirements 1 and 3. What changes do I need to fulfil requirement 2? .htaccess: Options +FollowSymLinks RewriteEngine On RewriteCond $0 !i18n/en-US [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(i18n)/([^/]+)/(.*)$ $1/en-US/$3 [NC,L]

    Read the article

  • mod_rewrite not working for a specific directory

    - by punkish
    This has got me completely foxed for a couple of days now, and I am convinced that I will look stupid once I solve it, but will be even stupider if I don't ask for help now. I have mod_rewrite working successfully on my localhost (no vhosts involved; this is my laptop, my development machine), and I use .htaccess in various directories to help rewrite crufty URLs to clean ones. EXCEPT... it doesn't work in one directory. Since it is impossible to reproduce my entire laptop in this question, I provide the following details. In my httpd.conf, I have mod_rewrite.so loaded. LoadModule rewrite_module modules/mod_rewrite.so In my httpd.conf, I have included another conf file like so Include /usr/local/apache2/conf/other/punkish.conf In my punkish.conf, I have directories defined like so DocumentRoot "/Users/punkish/Sites" <Directory "/Users/punkish/Sites"> Options ExecCGI AllowOverride None Order allow,deny Allow from all </Directory> <Directory "/Users/punkish/Sites/one"> Options FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> <Directory "/Users/punkish/Sites/two"> Options FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> In ~/Sites/one I have the following .htaccess file RewriteEngine On RewriteBase /one/ # If an actual file or directory is requested, serve directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Otherwise, pass everything through to the dispatcher RewriteRule ^(.*)$ index.cgi/$1 [L,QSA] and, everything works just fine. However, in my directory ~/Sites/two I have the following .htaccess file RewriteEngine On RewriteBase /two/ # If an actual file or directory is requested, serve directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Otherwise, pass everything through to the dispatcher RewriteRule ^(.*)$ index.cgi/$1 [L,QSA] and, nothing works. Nada. Zip. Zilch. I just get a 404. I have determined that mod_rewrite is not even looking at my ~/Sites/two/.htaccess by putting spurious commands in it and not getting any error other than 404. Another confounding issue -- I have turned on RewriteLog in my httpd.conf with RewriteLogLevel 3, but my rewrite_log is completely empty. I know this is hard to trouble shoot unless sitting physically at the computer in question, but I hope someone can give me some indication as to what is going on. **Update: ** There are no aliases involved anywhere. This is my laptop, and everything is under the above stated Document Root, so I just access each directory as http://localhost/. Yes, typos are a big possibility (I did say that I will look stupid once I solve it, however, for now, I have not discovered a single typo anywhere, and yes, I have restarted Apache about a dozen times now. I even thought that perhaps I had two different Apaches running, but no, I have only one, the one under /usr/local/apache2, and I installed it myself a while back.

    Read the article

  • how to remove .php from a certain file (with apache .htaccess)

    - by user2015253
    I want a certain file (only this!) to remove the php extension for calling it. BUT: It uses get parameters and they should remain! I tried it with my .htaccess and something like: RewriteEngine on followed by either RewriteRule ^file(.*)$ file.php$1 or RewriteRule ^file(.+)$ file.php$1 but it doesn't work. (First gives error 500, second gives 404) Example what I want to call in the browser: file?param=asd&foo=bar - It should call as: file.php?param=asd&foo=bar

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >