I'm testing a web example... I create a contact form on this direction, you can try to send an email and then view inspect-console or inspect-network:
http://www.novaderma.cl/site2/
It gives an error 404, "the requested URL was not found on this server" ...I don't know what's happening...here is the .htacces file, please help me !!
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [QSA,L]
</IfModule>
In htaccess file in the root directory add this rewrite rule
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL
RewriteRule ^(.*)$ index.php?url=$1 [PT,L]
</IfModule>
Also in codeigniter Config folder -> autoload.php file add url helper:
$autoload['helper'] = array('url');
You have to use below the code in your htaccess file...
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase //
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
Related
i am new in zend 2. i have run this application it can be properly work but access the other page or controller it can be give 404 error....
http://localhost/Gojavas/public/
Click on the login button
http://localhost/branch/login
automatic remove the main folder in url.....and display the 404 page error...please help me....thanx
Htaccess File
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteBase /Gojavas/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
<ifmodule !mod_rewrite.c>
ErrorDocument 404 /index.php
</ifmodule>
Please Try this,
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
... means that if the file with the specified name in the browser doesn't exist, or the directory in the browser doesn't exist then procede to the rewrite rule below
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ %{ENV:BASE}index.php?/$1 [QSA,L]
I am using this htaccess code, located in the directory development.local/web/, to redirect all of my paths to development.local/web/index.php file.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /web
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php?url=$1 [QSA,L]
</IfModule>
right now, I have development.local/web/ as my base url. so all paths must redirect to development.local/web/index.php as of right now all urls will redirect properly except development.local/web/ which gives me a 503 Forbidden Error.
Most likely you don't have DirectoryIndex setup.
Keep this in your .htaccess:
DirectoryIndex index.php
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
I've a folder named test, I can access it via http://domain.com/test. I'm trying to send every requests of http://domain.com/test/XXX (XXX = every thing) to a php file.
I used this in test/.htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /test
RewriteRule ^(.*)$ /control.php?path=$1 [L]
</IfModule>
control.php is in test folder too. But it doesn't work, i don't know in which rule i did a mistake! now every http://domain.com/test/XXX requests shows a 404 not found page!
Try this code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /test/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ control.php?path=$1 [L]
</IfModule>
I want to make an api with slim. it would be on my "tools" subdomain in a directory called api.
http://tools.fifaguide.com/api
What should my .htaccess file look like?
Currently my .htaccess is located in my Wordpress directory (html -> .htaccess), and it looks like this:
<IfModule mod_rewrite.c>
//my part
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/api/index.php
RewriteRule ^api/(.*) http://tools.fifaguide.com/api/index.php [L]
//wordpress part
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
The problem with this is that when I try
http://tools.fifaguide.com/api/hello/steve
I imediately get redirected back to api/index.php instead of staying on /api/hello/steve and having the results shown.
Its seems like wordpress is making this happen, but how do I prevent it?
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/api/ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ api/index.php [QSA,L]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
I use ISPConfig 3 to manage my domains/subdomains.
I added subdomain parim.kristian.ee which would redirect to web/parim/ (note: web/ is my document root).
ISPConfig generated such redirect to apache config:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^parim.kristian.ee [NC]
RewriteRule ^/(.*)$ /parim/$1 [L]
Now if i'll try to get static resources, such as http://parim.kristian.ee/images/1x1.gif, it serves fine, but when redirect is to codeigniter, it doesn't work.
Htaccess in web/parim/ looks like this:
<IfModule mod_rewrite.c>
RewriteEngine on
Options -Indexes
#Handle CodeIgniter request
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 ./index.php
</IfModule>
NOTE: accessing the same folder via http://kristian.ee/parim/ works!
I s*ck at htaccess, so any help is appreciated.
# To remove index.php from URL
RewriteEngine On
RewriteBase /parim
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
Or Simple remove RewriteBase /parim