Hi all,

I m newbie in .htaccess i am using .htaccess to make url SEO friendly.

I can access admin in localhost of my pc. but when i put all this files to my server i can't access admin. it shows me white blank page. without any message or error.

Please help me out to solve this problem. here is my .htaccess code.

Options +FollowSymLinks
RewriteEngine on

RewriteRule admin$ admin/index.php
RewriteRule admin/$ admin/index.php

RewriteBase /exotic/

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^fleet/(.*)/$ fleet_car.php?fl_id=$1 [QSA]

RewriteRule ^service/(.*)/$ services.php?s_id=$1 [QSA]

RewriteRule ^exoticcars/(.*)/$ exoticcar.php?e_id=$1 [QSA]

as i wrote rule for admin it works only in my localpc but didnt work with my server.

my site url is

my site admin url is


Please help me out asap.:S

Thanks in advance. !

Dani AI

Generated

Blank white pages on production usually mean a PHP fatal error with display_errors disabled, or a rewrite loop/path mismatch. First, try requesting /exotic/admin/index.php directly. If that loads, your rewrite rules are interfering with the admin directory rather than the app itself. Also double‑check case sensitivity: Linux hosting is case sensitive, so a folder named Admin will not be found by a rule or URL that uses admin.

Two pragmatic fixes:

  • Short-circuit rewrites for real files and directories.
  • Explicitly exclude the admin path from further rewriting and let Apache serve its DirectoryIndex.

Example lines to add near the top of your rules (before your SEO rewrites):

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]

RewriteRule ^admin(?:/|$) - [L,NC]

Additional tips:

  • Anchor your patterns (^...$) and add the [L] flag to each rule so later rules do not continue processing and clobber the admin request.
  • Check your server’s error log for the real cause of the blank page (on many hosts it is at ~/public_html/error_log). Enable PHP error reporting temporarily if needed (error_reporting).
  • You generally do not need a rewrite for /admin at all; Apache’s DirectoryIndex handles /admin -> /admin/index.php (mod_dir DirectorySlash).
  • If you must debug rewrites, increase Apache’s LogLevel for rewrite temporarily (LogLevel rewrite:trace3).

Recommended Answers

All 2 Replies

Member Avatar for Member #671080

Hi pbcomput,

Some webhosts are quite strict with what they will allow in .htaccess files. My previous host for example wouldn't allow me to customise them at all.

Contact your host and ask them if you are allowed to add your own .htaccess files.


Hope this helps.
Zagga

Hi Zagga,

my host allow me to put htaccess file.and all of my .htaccess rules are working fine with this .htaccess for example - RewriteRule ^fleet/(.*)/$ fleet_car.php?fl_id=$1 [QSA] rule for get url SEO friendly. and i got that url.

so, my problem is that i can't access admin panel. it seems that i done some mistake to write rule for admin panel. please help me to correct admin rule for .htaccess.


Thanks in advance.!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.