🔍 Deep Server Diagnostic - Chutki Cabs

1. Server Info

PropertyValue
ServerLiteSpeed
Hostwww.chutkicabs.in
Doc Root/home/chutkicabs.in/public_html
Script/home/chutkicabs.in/public_html/rewrite_test.php
PHP8.0.30

2. .htaccess Content on THIS Server

✅ .htaccess exists (224 lines, 9925 bytes)
â„šī¸ Found: RewriteEngine On
â„šī¸ Found: ErrorDocument 404 /router.php
â„šī¸ Found: Options -MultiViews +FollowSymLinks
âš ī¸ NOT found: RewriteBase
📄 Show full .htaccess
# ========== CORE ENGINE SETUP ==========
# Required for URL rewriting on LiteSpeed/Apache
Options -MultiViews +FollowSymLinks
RewriteEngine On

# PHP Router Fallback - catches any URL that mod_rewrite misses (LiteSpeed compatibility)
ErrorDocument 404 /router.php

# ========== NON-WWW TO WWW REDIRECT ==========
# Skip redirect for API calls to avoid breaking POST requests
RewriteCond %{HTTP_HOST} ^chutkicabs\.in$ [NC]
RewriteCond %{REQUEST_URI} !^/agent-web/api/ [NC]
RewriteRule ^(.*)$ https://www.chutkicabs.in/$1 [R=301,L]

# ========== SECURITY ==========
# Block .env files
RewriteRule \.env$ - [F,L,NC]

# Protect database config
RewriteRule ^config/database\.php$ - [F,L]
RewriteRule ^server/config/database\.php$ - [F,L]

# Protect sensitive files
<FilesMatch "^\.env">
    Require all denied
    Order allow,deny
    Deny from all
</FilesMatch>

# Protect config files
<FilesMatch "^(composer\.(json|lock)|test_connection\.php)$">
    Order allow,deny
    Deny from all
</FilesMatch>

# Block suspicious files
<FilesMatch "(pp|shell|backdoor|c99|r57|alfa)\.(php|txt)$">
    Order allow,deny
    Deny from all
</FilesMatch>
# ========== END SECURITY ==========

# Enable Gzip Compression
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/json application/xml
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4\.0[678] no-gzip
  BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>

# Browser Caching
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType image/jpg "access plus 1 year"
  ExpiresByType image/jpeg "access plus 1 year"
  ExpiresByType image/png "access plus 1 year"
  ExpiresByType image/gif "access plus 1 year"
  ExpiresByType image/webp "access plus 1 year"
  ExpiresByType text/css "access plus 1 month"
  ExpiresByType text/javascript "access plus 1 month"
  ExpiresByType application/javascript "access plus 1 month"
  ExpiresByType application/pdf "access plus 1 month"
  ExpiresByType image/x-icon "access plus 1 year"
</IfModule>

# Leverage Browser Caching
<IfModule mod_headers.c>
  <FilesMatch "\.(jpg|jpeg|png|gif|css|js|webp)$">
    Header set Cache-Control "max-age=31536000, public"
  </FilesMatch>
</IfModule>

# Security Headers
<IfModule mod_headers.c>
  Header set X-Content-Type-Options "nosniff"
  Header set X-Frame-Options "SAMEORIGIN"
  Header set X-XSS-Protection "1; mode=block"
</IfModule>

# ========== URL REWRITING ==========
# Allow user-app, agent-app, driver-app, admin folders - don't rewrite these paths
RewriteRule ^(user-app|agent-app|driver-app|admin)/ - [L]

# Prevent rewriting for existing files and directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

# ===== EXPLICIT ROUTE RULES =====
# All route pages (from-to-taxi format)

# Agra Routes
RewriteRule ^agra-to-bharatpur-taxi$ agra-to-bharatpur-taxi.php [L]
RewriteRule ^agra-to-delhi-taxi$ agra-to-delhi-taxi.php [L]
RewriteRule ^agra-to-jaipur-taxi$ agra-to-jaipur-taxi.php [L]
RewriteRule ^agra-to-lucknow-taxi$ agra-to-lucknow-taxi.php [L]
RewriteRule ^agra-to-mathura-taxi$ agra-to-mathura-taxi.php [L]

# Ahmedabad Routes
RewriteRule ^ahmedabad-to-diu-taxi$ ahmedabad-to-diu-taxi.php [L]
RewriteRule ^ahmedabad-to-dwarka-somnath-taxi$ ahmedabad-to-dwarka-somnath-taxi.php [L]
RewriteRule ^ahmedabad-to-dwarka-taxi$ ahmedabad-to-dwarka-taxi.php [L]
RewriteRule ^ahmedabad-to-jaipur-taxi$ ahmedabad-to-jaipur-taxi.php [L]
RewriteRule ^ahmedabad-to-mount-abu-taxi$ ahmedabad-to-mount-abu-taxi.php [L]
RewriteRule ^ahmedabad-to-mumbai-taxi$ ahmedabad-to-mumbai-taxi.php [L]
RewriteRule ^ahmedabad-to-rajkot-taxi$ ahmedabad-to-rajkot-taxi.php [L]
RewriteRule ^ahmedabad-to-somnath-taxi$ ahmedabad-to-somnath-taxi.php [L]
RewriteRule ^ahmedabad-to-statue-of-unity-taxi$ ahmedabad-to-statue-of-unity-taxi.php [L]
RewriteRule ^ahmedabad-to-surat-taxi$ ahmedabad-to-surat-taxi.php [L]
RewriteRule ^ahmedabad-to-udaipur-taxi$ ahmedabad-to-udaipur-taxi.php [L]
RewriteRule ^ahmedabad-to-vadodara-taxi$ ahmedabad-to-vadodara-taxi.php [L]

# Bareilly Routes
RewriteRule ^bareilly-to-delhi-taxi$ bareilly-to-delhi-taxi.php [L]
RewriteRule ^bareilly-to-haridwar-taxi$ bareilly-to-haridwar-taxi.php [L]
RewriteRule ^bareilly-to-nainital-taxi$ bareilly-to-nainital-taxi.php [L]
RewriteRule ^bareilly-to-agra-cab$ bareilly-to-agra-cab.php [L]
RewriteRule ^bareilly-to-lucknow-cab$ bareilly-to-lucknow-cab.php [L]

# Chandigarh Routes
RewriteRule ^chandigarh-to-delhi-taxi$ chandigarh-to-delhi-taxi.php [L]
RewriteRule ^chandigarh-to-dharamshala-taxi$ chandigarh-to-dharamshala-taxi.php [L]
RewriteRule ^chandigarh-to-manali-taxi$ chandigarh-to-manali-taxi.php [L]
RewriteRule ^chandigarh-to-shimla-taxi$ chandigarh-to-shimla-taxi.php [L]

# Dehradun Routes
RewriteRule ^dehradun-to-delhi-taxi$ dehradun-to-delhi-taxi.php [L]
RewriteRule ^dehradun-to-haridwar-taxi$ dehradun-to-haridwar-taxi.php [L]
RewriteRule ^dehradun-to-mussoorie-taxi$ dehradun-to-mussoorie-taxi.php [L]
RewriteRule ^dehradun-to-nainital-taxi$ dehradun-to-nainital-taxi.php [L]
RewriteRule ^dehradun-to-rishikesh-taxi$ dehradun-to-rishikesh-taxi.php [L]

# Delhi Routes
RewriteRule ^delhi-to-agra-taxi$ delhi-to-agra-taxi.php [L]
RewriteRule ^delhi-to-haridwar-taxi$ delhi-to-haridwar-taxi.php [L]
RewriteRule ^delhi-to-jaipur-taxi$ delhi-to-jaipur-taxi.php [L]

# Jaipur Routes (All routes from footer)
RewriteRule ^jaipur-to-agra-taxi$ jaipur-to-agra-taxi.php [L]
RewriteRule ^jaipur-to-ahmedabad-taxi$ jaipur-to-ahmedabad-taxi.php [L]
RewriteRule ^jaipur-to-ajmer-pushkar-taxi$ jaipur-to-ajmer-pushkar-taxi.php [L]
RewriteRule ^jaipur-to-ajmer-taxi$ jaipur-to-ajmer-taxi.php [L]
RewriteRule ^jaipur-to-bhilwara-taxi$ jaipur-to-bhilwara-taxi.php [L]
RewriteRule ^jaipur-to-bikaner-taxi$ jaipur-to-bikaner-taxi.php [L]
RewriteRule ^jaipur-to-delhi-airport-taxi$ jaipur-to-delhi-airport-taxi.php [L]
RewriteRule ^jaipur-to-delhi-taxi$ jaipur-to-delhi-taxi.php [L]
RewriteRule ^jaipur-to-jaisalmer-taxi$ jaipur-to-jaisalmer-taxi.php [L]
RewriteRule ^jaipur-to-jodhpur-taxi$ jaipur-to-jodhpur-taxi.php [L]
RewriteRule ^jaipur-to-khatushyamji-taxi$ jaipur-to-khatushyamji-taxi.php [L]
RewriteRule ^jaipur-to-kota-taxi$ jaipur-to-kota-taxi.php [L]
RewriteRule ^jaipur-to-mount-abu-taxi$ jaipur-to-mount-abu-taxi.php [L]
RewriteRule ^jaipur-to-mumbai-taxi$ jaipur-to-mumbai-taxi.php [L]
RewriteRule ^jaipur-to-ranthambore-taxi$ jaipur-to-ranthambore-taxi.php [L]
RewriteRule ^jaipur-to-salasar-balaji-taxi$ jaipur-to-salasar-balaji-taxi.php [L]
RewriteRule ^jaipur-to-sambhar-lake-taxi$ jaipur-to-sambhar-lake-taxi.php [L]
RewriteRule ^jaipur-to-udaipur-taxi$ jaipur-to-udaipur-taxi.php [L]

# Jodhpur Routes
RewriteRule ^jodhpur-to-ajmer-taxi$ jodhpur-to-ajmer-taxi.php [L]
RewriteRule ^jodhpur-to-jaipur-taxi$ jodhpur-to-jaipur-taxi.php [L]
RewriteRule ^jodhpur-to-jaisalmer-taxi$ jodhpur-to-jaisalmer-taxi.php [L]
RewriteRule ^jodhpur-to-mountabu-taxi$ jodhpur-to-mountabu-taxi.php [L]
RewriteRule ^jodhpur-to-udaipur-taxi$ jodhpur-to-udaipur-taxi.php [L]

# Lucknow Routes
RewriteRule ^lucknow-to-agra-taxi$ lucknow-to-agra-taxi.php [L]
RewriteRule ^lucknow-to-ayodhya-taxi$ lucknow-to-ayodhya-taxi.php [L]
RewriteRule ^lucknow-to-delhi-taxi$ lucknow-to-delhi-taxi.php [L]
RewriteRule ^lucknow-to-nainital-taxi$ lucknow-to-nainital-taxi.php [L]
RewriteRule ^lucknow-to-varanasi-taxi$ lucknow-to-varanasi-taxi.php [L]

# Mumbai Routes
RewriteRule ^mumbai-to-goa-taxi$ mumbai-to-goa-taxi.php [L]
RewriteRule ^mumbai-to-lonavala-taxi$ mumbai-to-lonavala-taxi.php [L]
RewriteRule ^mumbai-to-nashik-taxi$ mumbai-to-nashik-taxi.php [L]
RewriteRule ^mumbai-to-pune-taxi$ mumbai-to-pune-taxi.php [L]
RewriteRule ^mumbai-to-shirdi-taxi$ mumbai-to-shirdi-taxi.php [L]

# Special Service Pages
RewriteRule ^jaipur-sightseeing-taxi-packages$ jaipur-sightseeing-taxi-packages.php [L]
RewriteRule ^jodhpur-sightseeing-cab$ jodhpur-sightseeing-cab.php [L]
RewriteRule ^delhi-airport-taxi-service$ delhi-airport-taxi-service.php [L]
RewriteRule ^jodhpur-airport-taxi$ jodhpur-airport-taxi.php [L]

# ===== CITY SERVICE PAGES =====
# Explicit rules for existing city service pages
RewriteRule ^taxi-service-in-ahmedabad$ taxi-service-in-ahmedabad.php [L]
RewriteRule ^taxi-service-in-bareilly$ taxi-service-in-bareilly.php [L]
RewriteRule ^taxi-service-in-chandigarh$ taxi-service-in-chandigarh.php [L]
RewriteRule ^taxi-service-in-delhi$ taxi-service-in-delhi.php [L]
RewriteRule ^taxi-service-in-jaipur$ taxi-service-in-jaipur.php [L]
RewriteRule ^taxi-service-in-jodhpur$ taxi-service-in-jodhpur.php [L]
RewriteRule ^taxi-service-in-rajkot$ taxi-service-in-rajkot.php [L]

# City-specific service pages (cab-service variations)
RewriteRule ^agra-cab-service$ agra-cab-service.php [L]
RewriteRule ^bareilly-cab-service$ bareilly-cab-service.php [L]
RewriteRule ^dehradun-cab-service$ dehradun-cab-service.php [L]
RewriteRule ^delhi-cab-service$ delhi-cab-service.php [L]
RewriteRule ^jaipur-cab-service$ jaipur-cab-service.php [L]
RewriteRule ^jodhpur-cab-service$ jodhpur-cab-service.php [L]
RewriteRule ^lucknow-cab-service$ lucknow-cab-service.php [L]
RewriteRule ^mumbai-cab-service$ mumbai-cab-service.php [L]

# ===== DYNAMIC ROUTES =====
# Dynamic taxi service routes (will use city_template.php)
RewriteRule ^taxi-service-in-([a-zA-Z-]+)$ city_template.php?city=$1 [L,QSA]

# Dynamic routes (from-to) - fallback for any routes not explicitly defined
RewriteRule ^([a-zA-Z-]+)-to-([a-zA-Z-]+)-taxi$ route_template.php?from=$1&to=$2 [L,QSA]

# Blog Friendly URLs
RewriteRule ^blog/([a-zA-Z0-9-]+)$ blogs.php?slug=$1 [L,QSA]

# Remove trailing slashes
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$  /$1 [L,R=301]

# Explicitly allow share-app page
RewriteRule ^share-app\.php$ - [L]

# Allow user-app share-app  
RewriteRule ^user-app/share-app\.php$ - [L]

3. Test: Does .htaccess Block Work?

â„šī¸ .env file doesn't exist (404), can't confirm .htaccess blocking

4. Test: Does ErrorDocument 404 Work?

Testing: https://www.chutkicabs.in/this-page-definitely-does-not-exist-xyz123
Status: HTTP/1.1 404 Not Found
âš ī¸ Response: <!DOCTYPE html><html><head><meta charset="utf-8"><title>404 - Page Not Found | Chutki Cabs</title><style>body{font-family:Arial,sans-serif;display:flex;align-items:center;justify-content:center;min-he

5. Test: Does router.php Work Directly?

✅ router.php exists
Direct access status: HTTP/1.1 404 Not Found

6. Test: Does RewriteRule Work At All?

Testing clean URL: https://www.chutkicabs.in/jaipur-to-delhi-airport-taxi
Clean URL status: HTTP/1.1 200 OK
Testing direct PHP: https://www.chutkicabs.in/jaipur-to-delhi-airport-taxi.php
Direct PHP status: HTTP/1.1 200 OK

7. cPanel Error Page Check

8. Alternative Solution: PHP Auto-Prepend

Current auto_prepend_file: NONE
user_ini.filename: .user.ini
â„šī¸ No .user.ini found

9. Recommended Fix Based on Results

If ErrorDocument and RewriteRule both don't work:

Option A: Go to cPanel → "Error Pages" section → Set 404 page to /router.php

Option B: Go to cPanel → "LiteSpeed Web Cache Manager" → Flush All

Option C: Create .user.ini file with: auto_prepend_file = /home/chutkicabs.in/public_html/url_handler.php

Option D: Contact hosting support and ask them to enable "mod_rewrite" and "AllowOverride All" for your domain

Generated: 2026-06-09 20:48:13