Lukket

PHPLD SEO Friendly URL Mod_Rewrite

[url removed, login to view]

MOD_REWRITE for Friendly URLS

Look at the site real quick, hover over the CATEGORY links starting with "Arts which currently is [url removed, login to view] when it should be [url removed, login to view] and check out the targets.

All I need is help with the rewrite.

I suck at mod_rewrite so if you're good you will be my go to guy for now on. Must know reg-exp by heart.

There's about 3,500 categories all should work.

Here is current mod_rewrite: Bonus if you're fast. The engines are coming!

ty

## Deliverables

CURRENT REWRITE:

#################################################

## PHP Link Directory - Apache Server Settings ##

#################################################

# Prevent .htaccess and .htpasswd files from being viewed by web clients

<Files "^\.ht">

Order allow,deny

Deny from all

</Files>

# Protect files

<Files ~ "^(.*)\.(inc|inc\.php|tpl|sql)$">

Order deny,allow

Deny from all

</Files>

# Protect directories

<Files ~ "^(backup|files|images|include|lang|libs(/.+)?|temp(/.+)?|templates(/.+)?|javascripts(/.+)?)$">

Order deny,allow

Deny from all

</Files>

# Disable directory browsing

Options -Indexes

# Follow symbolic links in this directory

Options +FollowSymLinks

# Override PHP settings that cannot be changed at runtime

# (If your server supports PHP settings via htaccess you can comment following two lines off)

# php_value register_globals 0

# php_value session.auto_start 0

# Customized error messages

# ( If you are running in a subfolder please add it, example: "directory/[url removed, login to view]" )

ErrorDocument 404 [url removed, login to view]

# Set the default handler

DirectoryIndex [url removed, login to view]

# URL rewrite rules

<IfModule mod_rewrite.c>

RewriteEngine On

#Make sure RewriteBase points to the directory where you installed phpLD.

#Example: "/phpld" if your installation is in a "phpld" subdirectory.

#RewriteBase /

##Latest Links Rewrite

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^latest-links\.htm[l]?$ [url removed, login to view] [QSA,NC,L]

##Top Hits Rewrite

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^top-hits\.htm[l]?$ [url removed, login to view] [QSA,NC,L]

##Latest Articles Rewrite

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^latest-articles\.htm[l]?$ [url removed, login to view] [QSA,NC,L]

##Details Link Page Rewrite

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule (.*)detail/link-(.*)\.htm[l]?$ [url removed, login to view] [QSA,NC]

##Article Page Rewrite

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule (.*)articles/article-(.*)\.htm[l]?$ [url removed, login to view] [QSA,NC]

##Author Page Rewrite

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule (.*)authors/author-(.*)\.htm[l]?$ [url removed, login to view] [QSA,NC]

##Owner Page Rewrite

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule (.*)owner/owner-(.*)\.htm[l]?$ [url removed, login to view] [QSA,NC]

##Pagination Rewrite

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule (.*)page-[0-9]+\.html$ [url removed, login to view] [QSA,NC,L]

##Pages redirect

RewriteCond %{REQUEST_URI} !page-[0-9]+\.html?$

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^(.+)\.html$ [url removed, login to view]$1 [NC,QSA,L]

##Category redirect

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^(.*)$ [url removed, login to view] [QSA,L]

</IfModule>

Evner: Ingeniørarbejde, MySQL, PHP, Projekt Ledelse, Software Arkitektur, Software Testning, Web Hosting, Hjemmeside Management, Hjemmeside Testning

Se mere: web pagination, the seo guy, the points guy, seo friendly web directory, project handler, points guy, is there a need for authors, inc top, inc fast 500, com reg, a article by two author, 404 d, symbolic, suck, sql l, reg exp, html to tpl, ht, go lang, friendly

Om arbejdsgiveren:
( 69 bedømmelser ) Hartsdale,

Projekt ID: #3328845